diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index 40e26300..8557a785 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -688,6 +688,7 @@ struct ThreadData uint8_t isFiber; ThreadData* fiber; uint8_t* stackCount; + int32_t groupHint; tracy_force_inline void IncStackCount( int16_t srcloc ) { stackCount[uint16_t(srcloc)]++; } tracy_force_inline bool DecStackCount( int16_t srcloc ) { return --stackCount[uint16_t(srcloc)] != 0; } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 21bf3d96..4fd0c4fd 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1054,6 +1054,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks, bool allow f.Skip( ssz * ( 8 + 3 ) ); } } + td->groupHint = 0; m_data.threads[i] = td; m_threadMap.emplace( tid, td ); } @@ -3464,6 +3465,7 @@ ThreadData* Worker::NewThread( uint64_t thread, bool fiber ) td->fiber = nullptr; td->stackCount = (uint8_t*)m_slab.AllocBig( sizeof( uint8_t ) * 64*1024 ); memset( td->stackCount, 0, sizeof( uint8_t ) * 64*1024 ); + td->groupHint = 0; m_data.threads.push_back( td ); m_threadMap.emplace( thread, td ); m_data.threadDataLast.first = thread; @@ -4680,6 +4682,9 @@ bool Worker::Process( const QueueItem& ev ) case QueueType::MemNamePayload: ProcessMemNamePayload( ev.memName ); break; + case QueueType::ThreadGroupHint: + ProcessThreadGroupHint( ev.threadGroupHint ); + break; case QueueType::FiberEnter: ProcessFiberEnter( ev.fiberEnter ); break; @@ -6862,6 +6867,13 @@ void Worker::ProcessMemNamePayload( const QueueMemNamePayload& ev ) m_memNamePayload = ev.name; } +void Worker::ProcessThreadGroupHint( const QueueThreadGroupHint& ev ) +{ + auto td = RetrieveThread( ev.thread ); + assert( td ); + td->groupHint = ev.groupHint; +} + void Worker::ProcessFiberEnter( const QueueFiberEnter& ev ) { const auto t = TscTime( RefTime( m_refTimeThread, ev.time ) ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index f921facb..127dfa72 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -768,6 +768,7 @@ private: tracy_force_inline void ProcessSourceCodeNotAvailable( const QueueSourceCodeNotAvailable& ev ); tracy_force_inline void ProcessCpuTopology( const QueueCpuTopology& ev ); tracy_force_inline void ProcessMemNamePayload( const QueueMemNamePayload& ev ); + tracy_force_inline void ProcessThreadGroupHint( const QueueThreadGroupHint& ev ); tracy_force_inline void ProcessFiberEnter( const QueueFiberEnter& ev ); tracy_force_inline void ProcessFiberLeave( const QueueFiberLeave& ev );