mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 08:33:48 +00:00
Draw reconstructed callstack trace in zone tooltips.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user