Use reached stats for entry stacks access in assembly view.

The instruction tooltip advertised the number of "was executing" entry
call stacks, but middle-clicking opens the sample entry stacks window,
which now defaults to the "was reached" mode. Count the non-reentrant
reached stacks instead, so the tooltip matches what the window shows.

Gating on the reached map also makes entry stacks accessible for
symbols which only ever appear deeper in the call stack. This can
happen when inspecting instructions whose cost consists purely of
child samples.
This commit is contained in:
Bartosz Taudul
2026-07-25 19:45:58 +02:00
parent 2e9e0e2643
commit bacfbccb97
+3 -3
View File
@@ -3455,10 +3455,10 @@ 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 && !stats->wasExecuting.empty() )
if( stats && !stats->wasReached.empty() )
{
ImGui::Separator();
TextFocused( "Entry call stacks:", RealToString( stats->wasExecuting.size() ) );
TextFocused( "Entry call stacks:", RealToString( stats->wasReachedNonReentrant.size() ) );
ImGui::SameLine();
TextDisabledUnformatted( "(middle click to view)" );
}
@@ -3518,7 +3518,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
m_asmSampleSelect.clear();
m_asmGroupSelect = -1;
}
else if( stats && !stats->wasExecuting.empty() && ImGui::IsMouseClicked( ImGuiMouseButton_Middle ) )
else if( stats && !stats->wasReached.empty() && ImGui::IsMouseClicked( ImGuiMouseButton_Middle ) )
{
view.ShowSampleParents( symAddrParents, false );
}