mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-03 07:25:24 +00:00
Only show entry stacks button in symbol view when data is available.
The button was displayed unconditionally, allowing the sample entry stacks window to be opened for symbols without any sample data. Gate it on the availability of callstack sample statistics and a non-empty reached map, following what the call stack window does. Checking for statistics readiness also prevents asserting when the button is used while a trace is still being loaded in the background.
This commit is contained in:
@@ -763,9 +763,16 @@ void SourceView::RenderSymbolView( Worker& worker, View& view, WindowConstraints
|
||||
ImGui::TextDisabled( "(+%s inlined functions)", RealToString( inlineCount ) );
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::AlignTextToFramePadding();
|
||||
if( ImGui::SmallButton( ICON_FA_ARROW_DOWN_SHORT_WIDE " Entry stacks" ) ) view.ShowSampleParents( m_symAddr, !m_calcInlineStats );
|
||||
if( worker.AreCallstackSamplesReady() )
|
||||
{
|
||||
const auto stats = worker.GetSymbolStats( m_symAddr );
|
||||
if( stats && !stats->wasReached.empty() )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::AlignTextToFramePadding();
|
||||
if( ImGui::SmallButton( ICON_FA_ARROW_DOWN_SHORT_WIDE " Entry stacks" ) ) view.ShowSampleParents( m_symAddr, !m_calcInlineStats );
|
||||
}
|
||||
}
|
||||
if( inlineList )
|
||||
{
|
||||
if( m_calcInlineStats )
|
||||
|
||||
Reference in New Issue
Block a user