mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-17 05:05:58 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user