mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-12 19:31:47 +00:00
Allow zone name retrieval from source location.
This commit is contained in:
parent
48c721c4b9
commit
76186f3221
@ -1325,6 +1325,18 @@ const SourceLocation& Worker::GetSourceLocation( int32_t srcloc ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* Worker::GetZoneName( const SourceLocation& srcloc ) const
|
||||||
|
{
|
||||||
|
if( srcloc.name.active )
|
||||||
|
{
|
||||||
|
return GetString( srcloc.name );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetString( srcloc.function );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const char* Worker::GetZoneName( const ZoneEvent& ev ) const
|
const char* Worker::GetZoneName( const ZoneEvent& ev ) const
|
||||||
{
|
{
|
||||||
auto& srcloc = GetSourceLocation( ev.srcloc );
|
auto& srcloc = GetSourceLocation( ev.srcloc );
|
||||||
|
@ -252,6 +252,7 @@ public:
|
|||||||
const char* GetThreadString( uint64_t id ) const;
|
const char* GetThreadString( uint64_t id ) const;
|
||||||
const SourceLocation& GetSourceLocation( int32_t srcloc ) const;
|
const SourceLocation& GetSourceLocation( int32_t srcloc ) const;
|
||||||
|
|
||||||
|
const char* GetZoneName( const SourceLocation& srcloc ) const;
|
||||||
const char* GetZoneName( const ZoneEvent& ev ) const;
|
const char* GetZoneName( const ZoneEvent& ev ) const;
|
||||||
const char* GetZoneName( const ZoneEvent& ev, const SourceLocation& srcloc ) const;
|
const char* GetZoneName( const ZoneEvent& ev, const SourceLocation& srcloc ) const;
|
||||||
const char* GetZoneName( const GpuEvent& ev ) const;
|
const char* GetZoneName( const GpuEvent& ev ) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user