mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 08:33:48 +00:00
Line stats may not exist, even if the line has attributed cost.
One scenario for this to happen is when there's children calls data in the symbol.
This commit is contained in:
@@ -3558,11 +3558,11 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
|
||||
if( hw ) PrintHwSampleTooltip( cycles, retired, cacheRef, cacheMiss, branchRetired, branchMiss, false );
|
||||
|
||||
const auto& stats = *worker.GetSymbolStats( symAddrParents );
|
||||
if( !stats.parents.empty() )
|
||||
const auto stats = worker.GetSymbolStats( symAddrParents );
|
||||
if( stats && !stats->parents.empty() )
|
||||
{
|
||||
ImGui::Separator();
|
||||
TextFocused( "Entry call stacks:", RealToString( stats.parents.size() ) );
|
||||
TextFocused( "Entry call stacks:", RealToString( stats->parents.size() ) );
|
||||
ImGui::SameLine();
|
||||
TextDisabledUnformatted( "(middle click to view)" );
|
||||
}
|
||||
@@ -3622,7 +3622,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
m_asmSampleSelect.clear();
|
||||
m_asmGroupSelect = -1;
|
||||
}
|
||||
else if( !stats.parents.empty() && ImGui::IsMouseClicked( 2 ) )
|
||||
else if( stats && !stats->parents.empty() && ImGui::IsMouseClicked( 2 ) )
|
||||
{
|
||||
view.ShowSampleParents( symAddrParents, false );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user