1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Add external frames UI to flame graph.

This commit is contained in:
Bartosz Taudul 2024-12-16 14:28:35 +01:00
parent bb02d0b0af
commit 1e796064bc
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 15 additions and 0 deletions

View File

@ -519,6 +519,8 @@ private:
int m_flameMode = 0;
bool m_flameSort = false;
bool m_flameRunningTime = false;
bool m_flameExternal = true;
bool m_flameExternalTail = true;
int m_statSampleLocation = 2;
bool m_statHideUnknown = true;
bool m_showAllSymbols = false;

View File

@ -639,6 +639,19 @@ void View::DrawFlameGraph()
assert( !m_flameRunningTime );
}
}
else
{
ImGui::SameLine();
ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical );
ImGui::SameLine();
ImGui::Text( ICON_FA_SHIELD_HALVED "External" );
ImGui::SameLine();
if( ImGui::Checkbox( "Frames", &m_flameExternal ) ) m_flameGraphInvariant.Reset();
ImGui::SameLine();
if( m_flameExternal ) ImGui::BeginDisabled();
if( ImGui::Checkbox( "Tails", &m_flameExternalTail ) ) m_flameGraphInvariant.Reset();
if( m_flameExternal ) ImGui::EndDisabled();
}
auto& td = m_worker.GetThreadData();
auto expand = ImGui::TreeNode( ICON_FA_SHUFFLE " Visible threads:" );