mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Open find zone from flame graph.
This commit is contained in:
parent
6080b8742a
commit
959f0de7e5
@ -1108,6 +1108,7 @@ bool View::DrawImpl()
|
|||||||
|
|
||||||
if( m_showOptions ) DrawOptions();
|
if( m_showOptions ) DrawOptions();
|
||||||
if( m_showMessages ) DrawMessages();
|
if( m_showMessages ) DrawMessages();
|
||||||
|
if( m_showFlameGraph ) DrawFlameGraph();
|
||||||
if( m_findZone.show ) DrawFindZone();
|
if( m_findZone.show ) DrawFindZone();
|
||||||
if( m_showStatistics ) DrawStatistics();
|
if( m_showStatistics ) DrawStatistics();
|
||||||
if( m_memInfo.show ) DrawMemory();
|
if( m_memInfo.show ) DrawMemory();
|
||||||
@ -1125,7 +1126,6 @@ bool View::DrawImpl()
|
|||||||
if( m_sampleParents.symAddr != 0 ) DrawSampleParents();
|
if( m_sampleParents.symAddr != 0 ) DrawSampleParents();
|
||||||
if( m_showRanges ) DrawRanges();
|
if( m_showRanges ) DrawRanges();
|
||||||
if( m_showWaitStacks ) DrawWaitStacks();
|
if( m_showWaitStacks ) DrawWaitStacks();
|
||||||
if( m_showFlameGraph ) DrawFlameGraph();
|
|
||||||
|
|
||||||
if( m_setRangePopup.active )
|
if( m_setRangePopup.active )
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,8 @@ void View::DrawFlameGraphItem( const FlameGraphItem& item, FlameGraphContext& ct
|
|||||||
const auto darkColor = DarkenColor( color );
|
const auto darkColor = DarkenColor( color );
|
||||||
|
|
||||||
const auto zsz = x1 - x0;
|
const auto zsz = x1 - x0;
|
||||||
const char* name = m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function );
|
const char* slName = m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function );
|
||||||
|
const char* name = slName;
|
||||||
|
|
||||||
auto tsz = ImGui::CalcTextSize( name );
|
auto tsz = ImGui::CalcTextSize( name );
|
||||||
if( m_vd.shortenName == ShortenName::Always || ( ( m_vd.shortenName == ShortenName::NoSpace || m_vd.shortenName == ShortenName::NoSpaceAndNormalize ) && tsz.x > zsz ) )
|
if( m_vd.shortenName == ShortenName::Always || ( ( m_vd.shortenName == ShortenName::NoSpace || m_vd.shortenName == ShortenName::NoSpaceAndNormalize ) && tsz.x > zsz ) )
|
||||||
@ -166,6 +167,11 @@ void View::DrawFlameGraphItem( const FlameGraphItem& item, FlameGraphContext& ct
|
|||||||
TextFocused( "Time:", TimeToString( item.time ) );
|
TextFocused( "Time:", TimeToString( item.time ) );
|
||||||
if( !item.children.empty() ) TextFocused( "Self time:", TimeToString( self ) );
|
if( !item.children.empty() ) TextFocused( "Self time:", TimeToString( self ) );
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
|
|
||||||
|
if( ImGui::IsMouseClicked( 0 ) )
|
||||||
|
{
|
||||||
|
m_findZone.ShowZone( item.srcloc, slName );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t cts = ts;
|
uint64_t cts = ts;
|
||||||
|
Loading…
Reference in New Issue
Block a user