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

Add lock marking.

This commit is contained in:
Bartosz Taudul
2017-10-06 16:32:32 +02:00
parent 21c1533d8b
commit dcd89f894c
3 changed files with 24 additions and 0 deletions
+10
View File
@@ -21,6 +21,7 @@ enum class QueueType : uint8_t
LockWait,
LockObtain,
LockRelease,
LockMark,
NUM_TYPES
};
@@ -99,6 +100,13 @@ struct QueueLockRelease
uint64_t thread;
};
struct QueueLockMark
{
uint64_t id;
uint64_t thread;
uint64_t srcloc; // ptr
};
struct QueueHeader
{
union
@@ -124,6 +132,7 @@ struct QueueItem
QueueLockWait lockWait;
QueueLockObtain lockObtain;
QueueLockRelease lockRelease;
QueueLockMark lockMark;
};
};
@@ -145,6 +154,7 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueLockWait ),
sizeof( QueueHeader ) + sizeof( QueueLockObtain ),
sizeof( QueueHeader ) + sizeof( QueueLockRelease ),
sizeof( QueueHeader ) + sizeof( QueueLockMark ),
};
static_assert( sizeof( QueueDataSize ) / sizeof( size_t ) == (uint8_t)QueueType::NUM_TYPES, "QueueDataSize mismatch" );