Add inline symbols list accessor.

This commit is contained in:
Bartosz Taudul 2020-04-08 15:34:14 +02:00
parent 2a06f1545b
commit f59f4f266e
2 changed files with 9 additions and 0 deletions

View File

@ -2433,6 +2433,14 @@ const Vector<uint64_t>* Worker::GetAddressesForLocation( uint32_t fileStringIdx,
}
}
const uint64_t* Worker::GetInlineSymbolList( uint64_t sym, uint32_t len ) const
{
auto it = std::lower_bound( m_data.symbolLocInline.begin(), m_data.symbolLocInline.end(), sym );
if( it == m_data.symbolLocInline.end() ) return nullptr;
if( *it >= sym + len ) return nullptr;
return it;
}
int64_t Worker::GetZoneEnd( const ZoneEvent& ev )
{
auto ptr = &ev;

View File

@ -441,6 +441,7 @@ public:
uint64_t GetSymbolForAddress( uint64_t address, uint32_t& offset ) const;
StringIdx GetLocationForAddress( uint64_t address, uint32_t& line ) const;
const Vector<uint64_t>* GetAddressesForLocation( uint32_t fileStringIdx, uint32_t line ) const;
const uint64_t* GetInlineSymbolList( uint64_t sym, uint32_t len ) const;
#ifndef TRACY_NO_STATISTICS
const VarArray<CallstackFrameId>& GetParentCallstack( uint32_t idx ) const { return *m_data.parentCallstackPayload[idx]; }