Skip to content

Commit 21721dd

Browse files
committed
Add zone running time UI to flame graph window.
1 parent 98a064e commit 21721dd

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

‎profiler/src/profiler/TracyView.hpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ class View
513513
int m_statMode = 0;
514514
int m_flameMode = 0;
515515
bool m_flameSort = false;
516+
bool m_flameRunningTime = false;
516517
int m_statSampleLocation = 2;
517518
bool m_statHideUnknown = true;
518519
bool m_showAllSymbols = false;

‎profiler/src/profiler/TracyView_FlameGraph.cpp‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <assert.h>
12
#include <inttypes.h>
23

34
#include "TracyColor.hpp"
@@ -445,6 +446,19 @@ void View::DrawFlameGraph()
445446

446447
ImGui::Checkbox( ICON_FA_ARROW_UP_WIDE_SHORT " Sort by time", &m_flameSort );
447448

449+
if( m_flameMode == 0 )
450+
{
451+
if( m_worker.HasContextSwitches() )
452+
{
453+
ImGui::SameLine();
454+
ImGui::Checkbox( "Running time", &m_flameRunningTime );
455+
}
456+
else
457+
{
458+
assert( !m_flameRunningTime );
459+
}
460+
}
461+
448462
auto expand = ImGui::TreeNode( ICON_FA_SHUFFLE " Visible threads:" );
449463
ImGui::SameLine();
450464
size_t visibleThreads = 0;

0 commit comments

Comments
 (0)