Pass fiber group hint to NewThread().

This commit is contained in:
Bartosz Taudul 2024-08-04 00:09:51 +02:00
parent 37bfde5106
commit 835ba9fddf
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 5 additions and 5 deletions

View File

@ -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<ThreadData>();
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

View File

@ -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;