diff --git a/profiler/src/profiler/TracyView_FlameGraph.cpp b/profiler/src/profiler/TracyView_FlameGraph.cpp index e3aff9bc..5d9d890d 100644 --- a/profiler/src/profiler/TracyView_FlameGraph.cpp +++ b/profiler/src/profiler/TracyView_FlameGraph.cpp @@ -536,6 +536,15 @@ static void MergeFlameGraph( std::vector& dst, std::vector& data, uint64_t t = 0 ) +{ + for( auto& v : data ) + { + v.begin = t; + if( !v.children.empty() ) FixupTime( v.children, t ); + t += v.time; + } +} void View::DrawFlameGraph() @@ -700,6 +709,7 @@ void View::DrawFlameGraph() } if( m_flameSort ) SortFlameGraph( m_flameGraphData ); + FixupTime( m_flameGraphData ); } int64_t zsz = 0; diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index 0f9020f4..73301fa1 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -850,6 +850,7 @@ struct FlameGraphItem { int64_t srcloc; int64_t time; + int64_t begin; std::vector children; };