From bacfbccb977298a74bbc7962bac4f6334fabf3a9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 25 Jul 2026 18:37:18 +0200 Subject: [PATCH] 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. --- profiler/src/profiler/TracySourceView.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp index 70103059..f287a647 100644 --- a/profiler/src/profiler/TracySourceView.cpp +++ b/profiler/src/profiler/TracySourceView.cpp @@ -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 ); }