From bdacfe7c37f63f2d83470009c62c48bd1e88b7e3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 3 Aug 2024 19:55:37 +0200 Subject: [PATCH] Add a list of pending thread hints. --- server/TracyWorker.cpp | 1 + server/TracyWorker.hpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 4fd0c4fd..0a0ae99e 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -6872,6 +6872,7 @@ void Worker::ProcessThreadGroupHint( const QueueThreadGroupHint& ev ) auto td = RetrieveThread( ev.thread ); assert( td ); td->groupHint = ev.groupHint; + m_pendingThreadHints.emplace_back( ev.thread ); } void Worker::ProcessFiberEnter( const QueueFiberEnter& ev ) diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 127dfa72..d5159ed4 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -678,6 +678,9 @@ public: StringLocation StoreString(const char* str, size_t sz); + std::vector& GetPendingThreadHints() { return m_pendingThreadHints; } + void ClearPendingThreadHints() { m_pendingThreadHints.clear(); } + private: void Network(); void Exec(); @@ -1097,6 +1100,8 @@ private: unordered_flat_map m_powerData; Vector m_inlineStack; + + std::vector m_pendingThreadHints; }; }