From ec1c2d4267749816b839fb37a65b4059994e881e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 24 May 2026 14:23:59 +0200 Subject: [PATCH] Display aggregation counts in bottom / up sample trees. --- profiler/src/profiler/TracyView_FrameTree.cpp | 20 +++++++++++++++++++ server/TracyEvent.hpp | 2 ++ 2 files changed, 22 insertions(+) diff --git a/profiler/src/profiler/TracyView_FrameTree.cpp b/profiler/src/profiler/TracyView_FrameTree.cpp index b4571d0e..a382449e 100644 --- a/profiler/src/profiler/TracyView_FrameTree.cpp +++ b/profiler/src/profiler/TracyView_FrameTree.cpp @@ -32,6 +32,7 @@ static tracy_force_inline T* GetFrameTreeItemGroup( unordered_flat_mapsecond.group.emplace( idx.data ); return &it->second; } @@ -50,6 +51,7 @@ static tracy_force_inline T* GetParentFrameTreeItemGroup( unordered_flat_mapsecond.group.emplace( idx.data ); return &it->second; } @@ -517,6 +519,12 @@ void View::DrawFrameTreeLevel( const unordered_flat_map 1 ) + { + ImGui::SameLine(); + ImGui::TextDisabled( "(\xc3\x97%s)", RealToString( v.group.size() ) ); + } + if( m_callstackTreeBuzzAnim.Match( idx ) ) { const auto time = m_callstackTreeBuzzAnim.Time(); @@ -666,6 +674,12 @@ void View::DrawFrameTreeLevel( const unordered_flat_map 1 ) + { + ImGui::SameLine(); + ImGui::TextDisabled( "(\xc3\x97%s)", RealToString( v.group.size() ) ); + } + if( m_callstackTreeBuzzAnim.Match( idx ) ) { const auto time = m_callstackTreeBuzzAnim.Time(); @@ -810,6 +824,12 @@ void View::DrawParentsFrameTreeLevel( const unordered_flat_map 1 ) + { + ImGui::SameLine(); + ImGui::TextDisabled( "(\xc3\x97%s)", RealToString( v.group.size() ) ); + } + if( m_callstackTreeBuzzAnim.Match( idx ) ) { const auto time = m_callstackTreeBuzzAnim.Time(); diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index c8eb7ac0..485d5274 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -484,6 +484,7 @@ struct MemCallstackFrameTree uint32_t count; unordered_flat_map children; unordered_flat_set callstacks; + unordered_flat_set group; }; @@ -494,6 +495,7 @@ struct CallstackFrameTree CallstackFrameId frame; uint32_t count; unordered_flat_map children; + unordered_flat_set group; };