mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Rename CallstackFrameTree -> MemCallstackFrameTree.
This commit is contained in:
parent
c2e9b602be
commit
a2547ccf1d
@ -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<uint64_t, CallstackFrameTree> children;
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> children;
|
||||
unordered_flat_set<uint32_t> callstacks;
|
||||
};
|
||||
|
||||
enum { CallstackFrameTreeSize = sizeof( CallstackFrameTree ) };
|
||||
enum { MemCallstackFrameTreeSize = sizeof( MemCallstackFrameTree ) };
|
||||
|
||||
|
||||
struct CrashEvent
|
||||
|
@ -16756,17 +16756,17 @@ void View::ListMemData( std::vector<const MemEvent*>& vec, std::function<void(co
|
||||
}
|
||||
}
|
||||
|
||||
static tracy_force_inline CallstackFrameTree* GetFrameTreeItemNoGroup( unordered_flat_map<uint64_t, CallstackFrameTree>& tree, CallstackFrameId idx, const Worker& worker )
|
||||
static tracy_force_inline MemCallstackFrameTree* GetFrameTreeItemNoGroup( unordered_flat_map<uint64_t, MemCallstackFrameTree>& 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<uint64_t, CallstackFrameTree>& tree, CallstackFrameId idx, const Worker& worker )
|
||||
static tracy_force_inline MemCallstackFrameTree* GetFrameTreeItemGroup( unordered_flat_map<uint64_t, MemCallstackFrameTree>& 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<uint32_t, View::PathData> View::GetCallstackPaths( const MemD
|
||||
return pathSum;
|
||||
}
|
||||
|
||||
unordered_flat_map<uint64_t, CallstackFrameTree> View::GetCallstackFrameTreeBottomUp( const MemData& mem ) const
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> View::GetCallstackFrameTreeBottomUp( const MemData& mem ) const
|
||||
{
|
||||
unordered_flat_map<uint64_t, CallstackFrameTree> root;
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> root;
|
||||
auto pathSum = GetCallstackPaths( mem, m_activeOnlyBottomUp );
|
||||
if( m_groupCallstackTreeByNameBottomUp )
|
||||
{
|
||||
@ -16885,9 +16885,9 @@ unordered_flat_map<uint64_t, CallstackFrameTree> View::GetCallstackFrameTreeBott
|
||||
return root;
|
||||
}
|
||||
|
||||
unordered_flat_map<uint64_t, CallstackFrameTree> View::GetCallstackFrameTreeTopDown( const MemData& mem ) const
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> View::GetCallstackFrameTreeTopDown( const MemData& mem ) const
|
||||
{
|
||||
unordered_flat_map<uint64_t, CallstackFrameTree> root;
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> 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<uint64_t, CallstackFrameTree>& tree, int& idx )
|
||||
void View::DrawFrameTreeLevel( const unordered_flat_map<uint64_t, MemCallstackFrameTree>& tree, int& idx )
|
||||
{
|
||||
auto& io = ImGui::GetIO();
|
||||
|
||||
std::vector<unordered_flat_map<uint64_t, CallstackFrameTree>::const_iterator> sorted;
|
||||
std::vector<unordered_flat_map<uint64_t, MemCallstackFrameTree>::const_iterator> sorted;
|
||||
sorted.reserve( tree.size() );
|
||||
for( auto it = tree.begin(); it != tree.end(); ++it )
|
||||
{
|
||||
|
@ -227,9 +227,9 @@ private:
|
||||
void ListMemData( std::vector<const MemEvent*>& vec, std::function<void(const MemEvent*)> DrawAddress, const char* id = nullptr, int64_t startTime = -1, uint64_t pool = 0 );
|
||||
|
||||
unordered_flat_map<uint32_t, PathData> GetCallstackPaths( const MemData& mem, bool onlyActive ) const;
|
||||
unordered_flat_map<uint64_t, CallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
|
||||
unordered_flat_map<uint64_t, CallstackFrameTree> GetCallstackFrameTreeTopDown( const MemData& mem ) const;
|
||||
void DrawFrameTreeLevel( const unordered_flat_map<uint64_t, CallstackFrameTree>& tree, int& idx );
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> GetCallstackFrameTreeTopDown( const MemData& mem ) const;
|
||||
void DrawFrameTreeLevel( const unordered_flat_map<uint64_t, MemCallstackFrameTree>& tree, int& idx );
|
||||
void DrawZoneList( int id, const Vector<short_ptr<ZoneEvent>>& zones );
|
||||
|
||||
void DrawInfoWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user