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

Store shared lock bits only for shared locks.

This commit is contained in:
Bartosz Taudul
2017-12-17 18:44:31 +01:00
parent c3a32f9c35
commit d0d3bb1141
3 changed files with 195 additions and 85 deletions
+6 -1
View File
@@ -112,12 +112,17 @@ struct LockEvent
uint8_t lockingThread;
Type type;
uint8_t lockCount;
uint64_t waitShared;
uint64_t waitList;
};
struct LockEventShared : public LockEvent
{
uint64_t waitShared;
uint64_t sharedList;
};
enum { LockEventSize = sizeof( LockEvent ) };
enum { LockEventSharedSize = sizeof( LockEventShared ) };
enum { MaxLockThreads = sizeof( LockEvent::waitList ) * 8 };
static_assert( std::numeric_limits<decltype(LockEvent::lockCount)>::max() >= MaxLockThreads, "Not enough space for lock count." );