Generic callstack tree builder.

Previously this was exclusive for memory callstacks.
This commit is contained in:
Bartosz Taudul
2021-11-13 21:49:04 +01:00
parent c6be16dcd2
commit 4f6e9bbb65
3 changed files with 118 additions and 5 deletions

View File

@@ -471,6 +471,19 @@ struct MemCallstackFrameTree
enum { MemCallstackFrameTreeSize = sizeof( MemCallstackFrameTree ) };
struct CallstackFrameTree
{
CallstackFrameTree( CallstackFrameId id ) : frame( id ), count( 0 ) {}
CallstackFrameId frame;
uint32_t count;
unordered_flat_map<uint64_t, CallstackFrameTree> children;
unordered_flat_set<uint32_t> callstacks;
};
enum { CallstackFrameTreeSize = sizeof( CallstackFrameTree ) };
struct CrashEvent
{
uint64_t thread = 0;