mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Store fiber state is ThreadData.
This commit is contained in:
parent
229d547e91
commit
8f44f1c68b
@ -666,6 +666,7 @@ struct ThreadData
|
||||
Vector<SampleData> samples;
|
||||
SampleData pendingSample;
|
||||
uint64_t kernelSampleCnt;
|
||||
uint8_t isFiber;
|
||||
|
||||
tracy_force_inline void IncStackCount( int16_t srcloc ) { IncSrcLocCount( stackCount, srcloc ); }
|
||||
tracy_force_inline bool DecStackCount( int16_t srcloc ) { return DecSrcLocCount( stackCount, srcloc ); }
|
||||
|
@ -3561,7 +3561,7 @@ ThreadData* Worker::NoticeThreadReal( uint64_t thread )
|
||||
}
|
||||
else
|
||||
{
|
||||
return NewThread( thread );
|
||||
return NewThread( thread, false );
|
||||
}
|
||||
}
|
||||
|
||||
@ -3614,9 +3614,9 @@ const MemData& Worker::GetMemoryNamed( uint64_t name ) const
|
||||
return *it->second;
|
||||
}
|
||||
|
||||
ThreadData* Worker::NewThread( uint64_t thread )
|
||||
ThreadData* Worker::NewThread( uint64_t thread, bool fiber )
|
||||
{
|
||||
CheckThreadString( thread );
|
||||
if( !fiber ) CheckThreadString( thread );
|
||||
auto td = m_slab.AllocInit<ThreadData>();
|
||||
td->id = thread;
|
||||
td->count = 0;
|
||||
@ -3626,6 +3626,7 @@ ThreadData* Worker::NewThread( uint64_t thread )
|
||||
#endif
|
||||
td->kernelSampleCnt = 0;
|
||||
td->pendingSample.time.Clear();
|
||||
td->isFiber = fiber;
|
||||
m_data.threads.push_back( td );
|
||||
m_threadMap.emplace( thread, td );
|
||||
m_data.threadDataLast.first = thread;
|
||||
|
@ -743,7 +743,7 @@ private:
|
||||
void InsertMessageData( MessageData* msg );
|
||||
|
||||
ThreadData* NoticeThreadReal( uint64_t thread );
|
||||
ThreadData* NewThread( uint64_t thread );
|
||||
ThreadData* NewThread( uint64_t thread, bool fiber );
|
||||
tracy_force_inline ThreadData* NoticeThread( uint64_t thread )
|
||||
{
|
||||
if( m_data.threadDataLast.first == thread ) return m_data.threadDataLast.second;
|
||||
|
Loading…
x
Reference in New Issue
Block a user