mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 04:01: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:
parent
897aec5b06
commit
b89bfd44f1
@ -3558,11 +3558,11 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
|
|
||||||
if( hw ) PrintHwSampleTooltip( cycles, retired, cacheRef, cacheMiss, branchRetired, branchMiss, false );
|
if( hw ) PrintHwSampleTooltip( cycles, retired, cacheRef, cacheMiss, branchRetired, branchMiss, false );
|
||||||
|
|
||||||
const auto& stats = *worker.GetSymbolStats( symAddrParents );
|
const auto stats = worker.GetSymbolStats( symAddrParents );
|
||||||
if( !stats.parents.empty() )
|
if( stats && !stats->parents.empty() )
|
||||||
{
|
{
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
TextFocused( "Entry call stacks:", RealToString( stats.parents.size() ) );
|
TextFocused( "Entry call stacks:", RealToString( stats->parents.size() ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextDisabledUnformatted( "(middle click to view)" );
|
TextDisabledUnformatted( "(middle click to view)" );
|
||||||
}
|
}
|
||||||
@ -3622,7 +3622,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
m_asmSampleSelect.clear();
|
m_asmSampleSelect.clear();
|
||||||
m_asmGroupSelect = -1;
|
m_asmGroupSelect = -1;
|
||||||
}
|
}
|
||||||
else if( !stats.parents.empty() && ImGui::IsMouseClicked( 2 ) )
|
else if( stats && !stats->parents.empty() && ImGui::IsMouseClicked( 2 ) )
|
||||||
{
|
{
|
||||||
view.ShowSampleParents( symAddrParents, false );
|
view.ShowSampleParents( symAddrParents, false );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user