Display aggregation counts in bottom / up sample trees.

This commit is contained in:
Bartosz Taudul
2026-05-24 14:23:59 +02:00
parent b7e405ebbd
commit ec1c2d4267
2 changed files with 22 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ static tracy_force_inline T* GetFrameTreeItemGroup( unordered_flat_map<uint64_t,
{
it = tree.emplace( fidx, T( idx ) ).first;
}
it->second.group.emplace( idx.data );
return &it->second;
}
@@ -50,6 +51,7 @@ static tracy_force_inline T* GetParentFrameTreeItemGroup( unordered_flat_map<uin
{
it = tree.emplace( fidx, T( idx ) ).first;
}
it->second.group.emplace( idx.data );
return &it->second;
}
@@ -517,6 +519,12 @@ void View::DrawFrameTreeLevel( const unordered_flat_map<uint64_t, MemCallstackFr
ImGui::EndTooltip();
}
if( v.group.size() > 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<uint64_t, CallstackFrame
ImGui::PopID();
}
if( v.group.size() > 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<uint64_t, Callsta
ImGui::PopID();
}
if( v.group.size() > 1 )
{
ImGui::SameLine();
ImGui::TextDisabled( "(\xc3\x97%s)", RealToString( v.group.size() ) );
}
if( m_callstackTreeBuzzAnim.Match( idx ) )
{
const auto time = m_callstackTreeBuzzAnim.Time();

View File

@@ -484,6 +484,7 @@ struct MemCallstackFrameTree
uint32_t count;
unordered_flat_map<uint64_t, MemCallstackFrameTree> children;
unordered_flat_set<uint32_t> callstacks;
unordered_flat_set<uint64_t> group;
};
@@ -494,6 +495,7 @@ struct CallstackFrameTree
CallstackFrameId frame;
uint32_t count;
unordered_flat_map<uint64_t, CallstackFrameTree> children;
unordered_flat_set<uint64_t> group;
};