mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add symbol code accessor.
This commit is contained in:
parent
53d0b91f26
commit
79db7f4457
@ -2265,6 +2265,14 @@ const SymbolData* Worker::GetSymbolData( uint64_t sym ) const
|
||||
}
|
||||
}
|
||||
|
||||
const char* Worker::GetSymbolCode( uint64_t sym, uint32_t& len ) const
|
||||
{
|
||||
auto it = m_data.symbolCode.find( sym );
|
||||
if( it == m_data.symbolCode.end() ) return nullptr;
|
||||
len = it->second.len;
|
||||
return it->second.data;
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEnd( const ZoneEvent& ev )
|
||||
{
|
||||
auto ptr = &ev;
|
||||
|
@ -429,6 +429,7 @@ public:
|
||||
const CallstackFrameData* GetCallstackFrame( const CallstackFrameId& ptr ) const;
|
||||
uint64_t GetCanonicalPointer( const CallstackFrameId& id ) const;
|
||||
const SymbolData* GetSymbolData( uint64_t sym ) const;
|
||||
const char* GetSymbolCode( uint64_t sym, uint32_t& len ) const;
|
||||
|
||||
#ifndef TRACY_NO_STATISTICS
|
||||
const VarArray<CallstackFrameId>& GetParentCallstack( uint32_t idx ) const { return *m_data.parentCallstackPayload[idx]; }
|
||||
|
Loading…
Reference in New Issue
Block a user