1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Callstack capture for ZoneBegin.

This commit is contained in:
Bartosz Taudul
2018-06-22 00:56:01 +02:00
parent c0b086240c
commit b6088b908f
5 changed files with 64 additions and 0 deletions
+11
View File
@@ -12,8 +12,10 @@ enum class QueueType : uint8_t
Message,
ZoneBeginAllocSrcLoc,
CallstackMemory,
Callstack,
Terminate,
ZoneBegin,
ZoneBeginCallstack,
ZoneEnd,
FrameMarkMsg,
SourceLocation,
@@ -216,6 +218,12 @@ struct QueueCallstackMemory
uint64_t ptr;
};
struct QueueCallstack
{
uint64_t ptr;
uint64_t thread;
};
struct QueueCallstackFrame
{
uint64_t ptr;
@@ -259,6 +267,7 @@ struct QueueItem
QueueMemAlloc memAlloc;
QueueMemFree memFree;
QueueCallstackMemory callstackMemory;
QueueCallstack callstack;
QueueCallstackFrame callstackFrame;
};
};
@@ -272,9 +281,11 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueMessage ),
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // allocated source location
sizeof( QueueHeader ) + sizeof( QueueCallstackMemory ),
sizeof( QueueHeader ) + sizeof( QueueCallstack ),
// above items must be first
sizeof( QueueHeader ), // terminate
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ),
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // callstack
sizeof( QueueHeader ) + sizeof( QueueZoneEnd ),
sizeof( QueueHeader ) + sizeof( QueueFrameMark ),
sizeof( QueueHeader ) + sizeof( QueueSourceLocation ),