mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Collect callstacks for each entry in call stack tree.
This commit is contained in:
parent
44fae53583
commit
9301986bae
@ -177,6 +177,7 @@ struct CallstackFrameTree
|
|||||||
uint64_t allocExclusive, allocInclusive;
|
uint64_t allocExclusive, allocInclusive;
|
||||||
uint32_t countExclusive, countInclusive;
|
uint32_t countExclusive, countInclusive;
|
||||||
std::vector<CallstackFrameTree> children;
|
std::vector<CallstackFrameTree> children;
|
||||||
|
flat_hash_set<uint32_t, nohash<uint32_t>> callstacks;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { CallstackFrameTreeSize = sizeof( CallstackFrameTree ) };
|
enum { CallstackFrameTreeSize = sizeof( CallstackFrameTree ) };
|
||||||
|
|||||||
@ -7211,12 +7211,14 @@ std::vector<CallstackFrameTree> View::GetCallstackFrameTree( const MemData& mem
|
|||||||
auto treePtr = GetFrameTreeItem( root, base );
|
auto treePtr = GetFrameTreeItem( root, base );
|
||||||
treePtr->countInclusive += path.second.cnt;
|
treePtr->countInclusive += path.second.cnt;
|
||||||
treePtr->allocInclusive += path.second.mem;
|
treePtr->allocInclusive += path.second.mem;
|
||||||
|
treePtr->callstacks.emplace( path.first );
|
||||||
|
|
||||||
for( int i = int( cs.size() ) - 2; i >= 0; i-- )
|
for( int i = int( cs.size() ) - 2; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
treePtr = GetFrameTreeItem( treePtr->children, cs[i] );
|
treePtr = GetFrameTreeItem( treePtr->children, cs[i] );
|
||||||
treePtr->countInclusive += path.second.cnt;
|
treePtr->countInclusive += path.second.cnt;
|
||||||
treePtr->allocInclusive += path.second.mem;
|
treePtr->allocInclusive += path.second.mem;
|
||||||
|
treePtr->callstacks.emplace( path.first );
|
||||||
}
|
}
|
||||||
|
|
||||||
treePtr->countExclusive += path.second.cnt;
|
treePtr->countExclusive += path.second.cnt;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user