mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-24 01:30:47 +00:00
Add getter for section category name.
This commit is contained in:
@@ -9195,4 +9195,15 @@ bool Worker::IsSourceExternalBody( StringIdx filename, uint32_t key, unordered_f
|
||||
return res;
|
||||
}
|
||||
|
||||
const char* Worker::GetSectionCategoryDescription( uint16_t category ) const
|
||||
{
|
||||
auto it = m_data.sectionsDescription.find( category );
|
||||
assert( it != m_data.sectionsDescription.end() );
|
||||
if( it->second.Active() ) return GetString( it->second );
|
||||
|
||||
static char buf[64];
|
||||
sprintf( buf, "Category %" PRIu16, category );
|
||||
return buf;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -575,6 +575,7 @@ public:
|
||||
const Vector<short_ptr<FrameImage>>& GetFrameImages() const { return m_data.frameImage; }
|
||||
const Vector<StringRef>& GetAppInfo() const { return m_data.appInfo; }
|
||||
const unordered_flat_map<uint16_t, Vector<SectionItem>>& GetSections() const { return m_data.sections; }
|
||||
const char* GetSectionCategoryDescription( uint16_t category ) const;
|
||||
|
||||
const VarArray<CallstackFrameId>& GetCallstack( uint32_t idx ) const { return *m_data.callstackPayload[idx]; }
|
||||
const CallstackFrameData* GetCallstackFrame( const CallstackFrameId& ptr ) const;
|
||||
|
||||
Reference in New Issue
Block a user