1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-28 20:23:51 +00:00

No parents if only child samples.

This commit is contained in:
Bartosz Taudul 2021-04-18 21:59:28 +02:00
parent 141a4bc0fe
commit cba72859e9
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2530,8 +2530,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
inlineList++;
}
}
const auto& stats = *worker.GetSymbolStats( symAddrParents );
assert( !stats.parents.empty() );
if( m_font ) ImGui::PopFont();
ImGui::BeginTooltip();
@ -2545,10 +2543,14 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
TextFocused( "Child time:", TimeToString( ipcnt.ext * worker.GetSamplingPeriod() ) );
TextFocused( "Child samples:", RealToString( ipcnt.ext ) );
}
ImGui::Separator();
TextFocused( "Entry call stacks:", RealToString( stats.parents.size() ) );
ImGui::SameLine();
TextDisabledUnformatted( "(middle click to view)" );
const auto& stats = *worker.GetSymbolStats( symAddrParents );
if( !stats.parents.empty() )
{
ImGui::Separator();
TextFocused( "Entry call stacks:", RealToString( stats.parents.size() ) );
ImGui::SameLine();
TextDisabledUnformatted( "(middle click to view)" );
}
ImGui::EndTooltip();
if( m_font ) ImGui::PushFont( m_font );
@ -2605,7 +2607,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
m_asmSampleSelect.clear();
m_asmGroupSelect = -1;
}
else if( ImGui::IsMouseClicked( 2 ) )
else if( !stats.parents.empty() && ImGui::IsMouseClicked( 2 ) )
{
view.ShowSampleParents( symAddrParents );
}