Draw reconstructed callstack trace in zone tooltips.

This commit is contained in:
Bartosz Taudul
2026-03-21 01:27:12 +01:00
parent c4f42b1bc9
commit e1381d1beb

View File

@@ -1888,6 +1888,7 @@ void View::ZoneTooltip( const ZoneEvent& ev )
TextFocused( "Running state regions:", RealToString( cnt ) );
}
}
bool callstackDone = false;
if( m_worker.HasZoneExtra( ev ) )
{
auto& extra = m_worker.GetZoneExtra( ev );
@@ -1895,7 +1896,24 @@ void View::ZoneTooltip( const ZoneEvent& ev )
{
ImGui::Separator();
DrawCallstackCalls( extra.callstack.Val(), 6 );
callstackDone = true;
}
}
if( !callstackDone )
{
auto cs = ReconstructZoneCallstack( ev );
if( !cs.empty() )
{
ImGui::Separator();
TextDisabledUnformatted( ICON_FA_WAND_SPARKLES );
ImGui::SameLine();
DrawCallstackCalls( cs.data(), cs.size(), 6 );
}
}
if( m_worker.HasZoneExtra( ev ) )
{
auto& extra = m_worker.GetZoneExtra( ev );
if( extra.text.Active() )
{
ImGui::Separator();