mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Pass fiber group hint to NewThread().
This commit is contained in:
parent
37bfde5106
commit
835ba9fddf
@ -3372,7 +3372,7 @@ ThreadData* Worker::NoticeThreadReal( uint64_t thread )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CheckThreadString( thread );
|
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;
|
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>();
|
auto td = m_slab.AllocInit<ThreadData>();
|
||||||
td->id = thread;
|
td->id = thread;
|
||||||
@ -3472,7 +3472,7 @@ ThreadData* Worker::NewThread( uint64_t thread, bool fiber )
|
|||||||
td->fiber = nullptr;
|
td->fiber = nullptr;
|
||||||
td->stackCount = (uint8_t*)m_slab.AllocBig( sizeof( uint8_t ) * 64*1024 );
|
td->stackCount = (uint8_t*)m_slab.AllocBig( sizeof( uint8_t ) * 64*1024 );
|
||||||
memset( td->stackCount, 0, 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_data.threads.push_back( td );
|
||||||
m_threadMap.emplace( thread, td );
|
m_threadMap.emplace( thread, td );
|
||||||
m_data.threadDataLast.first = thread;
|
m_data.threadDataLast.first = thread;
|
||||||
@ -6893,7 +6893,7 @@ void Worker::ProcessFiberEnter( const QueueFiberEnter& ev )
|
|||||||
{
|
{
|
||||||
tid = ( uint64_t(1) << 32 ) | m_data.fiberToThreadMap.size();
|
tid = ( uint64_t(1) << 32 ) | m_data.fiberToThreadMap.size();
|
||||||
m_data.fiberToThreadMap.emplace( ev.fiber, tid );
|
m_data.fiberToThreadMap.emplace( ev.fiber, tid );
|
||||||
NewThread( tid, true );
|
NewThread( tid, true, ev.groupHint );
|
||||||
CheckFiberName( ev.fiber, tid );
|
CheckFiberName( ev.fiber, tid );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -821,7 +821,7 @@ private:
|
|||||||
void InsertMessageData( MessageData* msg );
|
void InsertMessageData( MessageData* msg );
|
||||||
|
|
||||||
ThreadData* NoticeThreadReal( uint64_t thread );
|
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 )
|
tracy_force_inline ThreadData* NoticeThread( uint64_t thread )
|
||||||
{
|
{
|
||||||
if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;
|
if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;
|
||||||
|
Loading…
Reference in New Issue
Block a user