diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index abca931c..4d1330b9 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -457,18 +457,18 @@ struct CallstackFrameData enum { CallstackFrameDataSize = sizeof( CallstackFrameData ) }; -struct CallstackFrameTree +struct MemCallstackFrameTree { - CallstackFrameTree( CallstackFrameId id ) : frame( id ), alloc( 0 ), count( 0 ) {} + MemCallstackFrameTree( CallstackFrameId id ) : frame( id ), alloc( 0 ), count( 0 ) {} CallstackFrameId frame; uint64_t alloc; uint32_t count; - unordered_flat_map children; + unordered_flat_map children; unordered_flat_set callstacks; }; -enum { CallstackFrameTreeSize = sizeof( CallstackFrameTree ) }; +enum { MemCallstackFrameTreeSize = sizeof( MemCallstackFrameTree ) }; struct CrashEvent diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ba17819d..0cab528f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -16756,17 +16756,17 @@ void View::ListMemData( std::vector& vec, std::function& tree, CallstackFrameId idx, const Worker& worker ) +static tracy_force_inline MemCallstackFrameTree* GetFrameTreeItemNoGroup( unordered_flat_map& tree, CallstackFrameId idx, const Worker& worker ) { auto it = tree.find( idx.data ); if( it == tree.end() ) { - it = tree.emplace( idx.data, CallstackFrameTree( idx ) ).first; + it = tree.emplace( idx.data, MemCallstackFrameTree( idx ) ).first; } return &it->second; } -static tracy_force_inline CallstackFrameTree* GetFrameTreeItemGroup( unordered_flat_map& tree, CallstackFrameId idx, const Worker& worker ) +static tracy_force_inline MemCallstackFrameTree* GetFrameTreeItemGroup( unordered_flat_map& tree, CallstackFrameId idx, const Worker& worker ) { auto frameDataPtr = worker.GetCallstackFrame( idx ); if( !frameDataPtr ) return nullptr; @@ -16778,7 +16778,7 @@ static tracy_force_inline CallstackFrameTree* GetFrameTreeItemGroup( unordered_f auto it = tree.find( fidx ); if( it == tree.end() ) { - it = tree.emplace( fidx, CallstackFrameTree( idx ) ).first; + it = tree.emplace( fidx, MemCallstackFrameTree( idx ) ).first; } return &it->second; } @@ -16832,9 +16832,9 @@ unordered_flat_map View::GetCallstackPaths( const MemD return pathSum; } -unordered_flat_map View::GetCallstackFrameTreeBottomUp( const MemData& mem ) const +unordered_flat_map View::GetCallstackFrameTreeBottomUp( const MemData& mem ) const { - unordered_flat_map root; + unordered_flat_map root; auto pathSum = GetCallstackPaths( mem, m_activeOnlyBottomUp ); if( m_groupCallstackTreeByNameBottomUp ) { @@ -16885,9 +16885,9 @@ unordered_flat_map View::GetCallstackFrameTreeBott return root; } -unordered_flat_map View::GetCallstackFrameTreeTopDown( const MemData& mem ) const +unordered_flat_map View::GetCallstackFrameTreeTopDown( const MemData& mem ) const { - unordered_flat_map root; + unordered_flat_map root; auto pathSum = GetCallstackPaths( mem, m_activeOnlyTopDown ); if( m_groupCallstackTreeByNameTopDown ) { @@ -17392,11 +17392,11 @@ void View::DrawMemory() ImGui::End(); } -void View::DrawFrameTreeLevel( const unordered_flat_map& tree, int& idx ) +void View::DrawFrameTreeLevel( const unordered_flat_map& tree, int& idx ) { auto& io = ImGui::GetIO(); - std::vector::const_iterator> sorted; + std::vector::const_iterator> sorted; sorted.reserve( tree.size() ); for( auto it = tree.begin(); it != tree.end(); ++it ) { diff --git a/server/TracyView.hpp b/server/TracyView.hpp index f3aa0477..24e1883c 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -227,9 +227,9 @@ private: void ListMemData( std::vector& vec, std::function DrawAddress, const char* id = nullptr, int64_t startTime = -1, uint64_t pool = 0 ); unordered_flat_map GetCallstackPaths( const MemData& mem, bool onlyActive ) const; - unordered_flat_map GetCallstackFrameTreeBottomUp( const MemData& mem ) const; - unordered_flat_map GetCallstackFrameTreeTopDown( const MemData& mem ) const; - void DrawFrameTreeLevel( const unordered_flat_map& tree, int& idx ); + unordered_flat_map GetCallstackFrameTreeBottomUp( const MemData& mem ) const; + unordered_flat_map GetCallstackFrameTreeTopDown( const MemData& mem ) const; + void DrawFrameTreeLevel( const unordered_flat_map& tree, int& idx ); void DrawZoneList( int id, const Vector>& zones ); void DrawInfoWindow();