1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 20:33:52 +00:00

Allow checking if thread is a fiber.

This commit is contained in:
Bartosz Taudul 2021-11-06 19:02:02 +01:00
parent 3ede2a1345
commit 0075050679
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 7 additions and 0 deletions

View File

@ -2682,6 +2682,12 @@ bool Worker::IsThreadLocal( uint64_t id )
return td && ( td->count > 0 || !td->samples.empty() );
}
bool Worker::IsThreadFiber( uint64_t id )
{
auto td = RetrieveThread( id );
return td && ( td->isFiber );
}
const SourceLocation& Worker::GetSourceLocation( int16_t srcloc ) const
{
if( srcloc < 0 )

View File

@ -541,6 +541,7 @@ public:
const char* GetString( const StringIdx& idx ) const;
const char* GetThreadName( uint64_t id ) const;
bool IsThreadLocal( uint64_t id );
bool IsThreadFiber( uint64_t id );
const SourceLocation& GetSourceLocation( int16_t srcloc ) const;
std::pair<const char*, const char*> GetExternalName( uint64_t id ) const;