From 835ba9fddf184dab89cae72e13aeadc01ec5ab0d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 4 Aug 2024 00:09:51 +0200 Subject: [PATCH] Pass fiber group hint to NewThread(). --- server/TracyWorker.cpp | 8 ++++---- server/TracyWorker.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 7b9ad7d2..5c297291 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -3372,7 +3372,7 @@ ThreadData* Worker::NoticeThreadReal( uint64_t thread ) else { CheckThreadString( thread ); - return NewThread( thread, false ); + return NewThread( thread, false, 0 ); } } @@ -3457,7 +3457,7 @@ const MemData& Worker::GetMemoryNamed( uint64_t name ) const return *it->second; } -ThreadData* Worker::NewThread( uint64_t thread, bool fiber ) +ThreadData* Worker::NewThread( uint64_t thread, bool fiber, int32_t groupHint ) { auto td = m_slab.AllocInit(); td->id = thread; @@ -3472,7 +3472,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; + td->groupHint = groupHint; m_data.threads.push_back( td ); m_threadMap.emplace( thread, td ); m_data.threadDataLast.first = thread; @@ -6893,7 +6893,7 @@ void Worker::ProcessFiberEnter( const QueueFiberEnter& ev ) { tid = ( uint64_t(1) << 32 ) | m_data.fiberToThreadMap.size(); m_data.fiberToThreadMap.emplace( ev.fiber, tid ); - NewThread( tid, true ); + NewThread( tid, true, ev.groupHint ); CheckFiberName( ev.fiber, tid ); } else diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index d5159ed4..0a4ca829 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -821,7 +821,7 @@ private: void InsertMessageData( MessageData* msg ); ThreadData* NoticeThreadReal( uint64_t thread ); - ThreadData* NewThread( uint64_t thread, bool fiber ); + ThreadData* NewThread( uint64_t thread, bool fiber, int32_t groupHint ); tracy_force_inline ThreadData* NoticeThread( uint64_t thread ) { if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;