From c3a32f9c350e58f14e013b96ee1f740d8bf2218d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 17 Dec 2017 18:30:34 +0100 Subject: [PATCH] Send lock type in LockWait/LockSharedWait events. This will be needed for proper construction of LockMap on the server, in case the LockAnnounce message hasn't arrived yet. --- client/TracyLock.hpp | 3 +++ common/TracyQueue.hpp | 1 + 2 files changed, 4 insertions(+) diff --git a/client/TracyLock.hpp b/client/TracyLock.hpp index 59e3bead..d84b041f 100644 --- a/client/TracyLock.hpp +++ b/client/TracyLock.hpp @@ -47,6 +47,7 @@ public: item->lockWait.id = m_id; item->lockWait.thread = thread; item->lockWait.time = Profiler::GetTime(); + item->lockWait.type = LockType::Lockable; tail.store( magic + 1, std::memory_order_release ); } @@ -152,6 +153,7 @@ public: item->lockWait.id = m_id; item->lockWait.thread = thread; item->lockWait.time = Profiler::GetTime(); + item->lockWait.type = LockType::SharedLockable; tail.store( magic + 1, std::memory_order_release ); } @@ -215,6 +217,7 @@ public: item->lockWait.id = m_id; item->lockWait.thread = thread; item->lockWait.time = Profiler::GetTime(); + item->lockWait.type = LockType::SharedLockable; tail.store( magic + 1, std::memory_order_release ); } diff --git a/common/TracyQueue.hpp b/common/TracyQueue.hpp index d2e95ebc..0762f39c 100644 --- a/common/TracyQueue.hpp +++ b/common/TracyQueue.hpp @@ -101,6 +101,7 @@ struct QueueLockWait uint32_t id; int64_t time; uint64_t thread; + LockType type; }; struct QueueLockObtain