mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Use help marker helper function.
This commit is contained in:
parent
96e38501b6
commit
f1940aab2e
@ -497,8 +497,9 @@ void View::DrawHelpMarker( const char* desc ) const
|
|||||||
TextDisabledUnformatted( "(?)" );
|
TextDisabledUnformatted( "(?)" );
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
|
const auto ty = ImGui::GetFontSize();
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::PushTextWrapPos( 450.0f );
|
ImGui::PushTextWrapPos( 450.0f * ty / 15.f );
|
||||||
ImGui::TextUnformatted( desc );
|
ImGui::TextUnformatted( desc );
|
||||||
ImGui::PopTextWrapPos();
|
ImGui::PopTextWrapPos();
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
@ -4538,13 +4539,7 @@ void View::DrawOptions()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Right click on lock name to open lock information window." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Right click on lock name to open lock information window." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
for( const auto& l : m_worker.GetLockMap() )
|
for( const auto& l : m_worker.GetLockMap() )
|
||||||
{
|
{
|
||||||
@ -4776,13 +4771,7 @@ void View::DrawMessages()
|
|||||||
ImGui::Columns( 3 );
|
ImGui::Columns( 3 );
|
||||||
ImGui::TextUnformatted( "Time" );
|
ImGui::TextUnformatted( "Time" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Click on message to center timeline on it." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Click on message to center timeline on it." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Thread" );
|
ImGui::TextUnformatted( "Thread" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -5054,13 +5043,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox( "Cumulate time", &m_findZone.cumulateTime );
|
ImGui::Checkbox( "Cumulate time", &m_findZone.cumulateTime );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Show total time taken by calls in each bin instead of call counts." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Show total time taken by calls in each bin instead of call counts." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::Checkbox( "Self time", &m_findZone.selfTime ) )
|
if( ImGui::Checkbox( "Self time", &m_findZone.selfTime ) )
|
||||||
{
|
{
|
||||||
@ -5241,13 +5224,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::TextUnformatted( "none" );
|
ImGui::TextUnformatted( "none" );
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Left draw on histogram to select range. Right click to clear selection." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Left draw on histogram to select range. Right click to clear selection." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
if( m_findZone.highlight.active )
|
if( m_findZone.highlight.active )
|
||||||
{
|
{
|
||||||
TextFocused( "Selection time:", TimeToString( selectionTime ) );
|
TextFocused( "Selection time:", TimeToString( selectionTime ) );
|
||||||
@ -5600,13 +5577,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::TextUnformatted( "Found zones:" );
|
ImGui::TextUnformatted( "Found zones:" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Left click to highlight entry. Right click to clear selection." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Left click to highlight entry. Right click to clear selection." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool groupChanged = false;
|
bool groupChanged = false;
|
||||||
ImGui::TextUnformatted( "Group by:" );
|
ImGui::TextUnformatted( "Group by:" );
|
||||||
@ -5632,13 +5603,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::RadioButton( "MTPC", (int*)( &m_findZone.sortBy ), (int)FindZone::SortBy::Mtpc );
|
ImGui::RadioButton( "MTPC", (int*)( &m_findZone.sortBy ), (int)FindZone::SortBy::Mtpc );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Mean time per call" );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Mean time per call" );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto& zones = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] ).zones;
|
auto& zones = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] ).zones;
|
||||||
auto sz = zones.size();
|
auto sz = zones.size();
|
||||||
@ -5775,13 +5740,7 @@ void View::DrawFindZone()
|
|||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
if( ImGui::SmallButton( "Name" ) ) m_findZone.tableSortBy = FindZone::TableSortBy::Name;
|
if( ImGui::SmallButton( "Name" ) ) m_findZone.tableSortBy = FindZone::TableSortBy::Name;
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Only displayed if custom zone name is set." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Only displayed if custom zone name is set." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
@ -6113,23 +6072,11 @@ void View::DrawCompare()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox( "Cumulate time", &m_compare.cumulateTime );
|
ImGui::Checkbox( "Cumulate time", &m_compare.cumulateTime );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Show total time taken by calls in each bin instead of call counts." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Show total time taken by calls in each bin instead of call counts." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox( "Normalize values", &m_compare.normalize );
|
ImGui::Checkbox( "Normalize values", &m_compare.normalize );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Normalization will fudge reported data values!" );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Normalization will fudge reported data values!" );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
TextDisabledUnformatted( "Time range:" );
|
TextDisabledUnformatted( "Time range:" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -6608,13 +6555,7 @@ void View::DrawStatistics()
|
|||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
if( ImGui::SmallButton( "MTPC" ) ) m_statSort = 2;
|
if( ImGui::SmallButton( "MTPC" ) ) m_statSort = 2;
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Mean time per call" );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Mean time per call" );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
@ -6672,25 +6613,11 @@ void View::DrawCallstackWindow()
|
|||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Function" );
|
ImGui::TextUnformatted( "Function" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Click on entry to copy it to clipboard." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Click on entry to copy it to clipboard." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Location" );
|
ImGui::TextUnformatted( "Location" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Click on entry to copy it to clipboard.\nRight click on entry to try to open source file." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Click on entry to copy it to clipboard." );
|
|
||||||
ImGui::TextUnformatted( "Right click on entry to try to open source file." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
|
||||||
|
|
||||||
int fidx = 0;
|
int fidx = 0;
|
||||||
int bidx = 0;
|
int bidx = 0;
|
||||||
@ -7566,60 +7493,27 @@ void View::ListMemData( T ptr, T end, std::function<void(T&)> DrawAddress, const
|
|||||||
ImGui::Columns( 8 );
|
ImGui::Columns( 8 );
|
||||||
ImGui::TextUnformatted( "Address" );
|
ImGui::TextUnformatted( "Address" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Click on address to display memory allocation info window.\nMiddle click to zoom to allocation range." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Click on address to display memory allocation info window." );
|
|
||||||
ImGui::TextUnformatted( "Middle click to zoom to allocation range." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Size" );
|
ImGui::TextUnformatted( "Size" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Appeared at" );
|
ImGui::TextUnformatted( "Appeared at" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Click on entry to center timeline at the memory allocation time." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Click on entry to center timeline at the memory allocation time." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Duration" );
|
ImGui::TextUnformatted( "Duration" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Active allocations are displayed using green color.\nClick on entry to center timeline at the memory release time." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Active allocations are displayed using green color." );
|
|
||||||
ImGui::TextUnformatted( "Click on entry to center timeline at the memory release time." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Thread" );
|
ImGui::TextUnformatted( "Thread" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Shows one thread if alloc and free was performed on the same thread.\nOtherwise two threads are displayed in order: alloc, free." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Shows one thread if alloc and free was performed on the same thread." );
|
|
||||||
ImGui::TextUnformatted( "Otherwise two threads are displayed in order: alloc, free." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Zone alloc" );
|
ImGui::TextUnformatted( "Zone alloc" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Zone free" );
|
ImGui::TextUnformatted( "Zone free" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "If alloc and free is performed in the same zone, it is displayed in yellow color." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "If alloc and free is performed in the same zone, it is displayed in yellow color." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( "Call stack" );
|
ImGui::TextUnformatted( "Call stack" );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -7963,14 +7857,7 @@ void View::DrawMemory()
|
|||||||
ImGui::Checkbox( "Restrict time", &m_memInfo.restrictTime );
|
ImGui::Checkbox( "Restrict time", &m_memInfo.restrictTime );
|
||||||
#endif
|
#endif
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "Don't show allocations beyond the middle of timeline display (it is indicated by purple line)." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "Don't show allocations beyond the middle of timeline" );
|
|
||||||
ImGui::TextUnformatted( "display (it is indicated by purple line)." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto zvMid = m_zvStart + ( m_zvEnd - m_zvStart ) / 2;
|
const auto zvMid = m_zvStart + ( m_zvEnd - m_zvStart ) / 2;
|
||||||
|
|
||||||
@ -8187,13 +8074,7 @@ void View::DrawMemory()
|
|||||||
{
|
{
|
||||||
ImGui::Checkbox( "Group by function name", &m_groupCallstackTreeByNameBottomUp );
|
ImGui::Checkbox( "Group by function name", &m_groupCallstackTreeByNameBottomUp );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "If enabled, only one source location will be displayed (which may be incorrect)." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "If enabled, only one source location will be displayed (which may be incorrect)." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
TextDisabledUnformatted( "Press ctrl key to display allocation info tooltip." );
|
TextDisabledUnformatted( "Press ctrl key to display allocation info tooltip." );
|
||||||
TextDisabledUnformatted( "Right click on function name to display allocations list. Right click on file name to open source file." );
|
TextDisabledUnformatted( "Right click on function name to display allocations list. Right click on file name to open source file." );
|
||||||
|
|
||||||
@ -8215,13 +8096,7 @@ void View::DrawMemory()
|
|||||||
{
|
{
|
||||||
ImGui::Checkbox( "Group by function name", &m_groupCallstackTreeByNameTopDown );
|
ImGui::Checkbox( "Group by function name", &m_groupCallstackTreeByNameTopDown );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(?)" );
|
DrawHelpMarker( "If enabled, only one source location will be displayed (which may be incorrect)." );
|
||||||
if( ImGui::IsItemHovered() )
|
|
||||||
{
|
|
||||||
ImGui::BeginTooltip();
|
|
||||||
ImGui::TextUnformatted( "If enabled, only one source location will be displayed (which may be incorrect)." );
|
|
||||||
ImGui::EndTooltip();
|
|
||||||
}
|
|
||||||
TextDisabledUnformatted( "Press ctrl key to display allocation info tooltip." );
|
TextDisabledUnformatted( "Press ctrl key to display allocation info tooltip." );
|
||||||
TextDisabledUnformatted( "Right click on function name to display allocations list. Right click on file name to open source file." );
|
TextDisabledUnformatted( "Right click on function name to display allocations list. Right click on file name to open source file." );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user