Allow determining whether thread is local to profiled program.

This commit is contained in:
Bartosz Taudul 2019-08-16 17:59:25 +02:00
parent cef7e4b8d0
commit c212661714
2 changed files with 6 additions and 0 deletions

View File

@ -1819,6 +1819,11 @@ const char* Worker::GetThreadString( uint64_t id ) const
} }
} }
bool Worker::IsThreadLocal( uint64_t id ) const
{
return m_data.threadMap.find( id ) != m_data.threadMap.end();
}
const SourceLocation& Worker::GetSourceLocation( int16_t srcloc ) const const SourceLocation& Worker::GetSourceLocation( int16_t srcloc ) const
{ {
if( srcloc < 0 ) if( srcloc < 0 )

View File

@ -332,6 +332,7 @@ public:
const char* GetString( const StringRef& ref ) const; const char* GetString( const StringRef& ref ) const;
const char* GetString( const StringIdx& idx ) const; const char* GetString( const StringIdx& idx ) const;
const char* GetThreadString( uint64_t id ) const; const char* GetThreadString( uint64_t id ) const;
bool IsThreadLocal( uint64_t id ) const;
const SourceLocation& GetSourceLocation( int16_t srcloc ) const; const SourceLocation& GetSourceLocation( int16_t srcloc ) const;
const char* GetZoneName( const SourceLocation& srcloc ) const; const char* GetZoneName( const SourceLocation& srcloc ) const;