Add addressess accessor.

This commit is contained in:
Bartosz Taudul 2020-04-02 02:17:22 +02:00
parent 22e9135ab1
commit 2b8cf5d132
2 changed files with 14 additions and 0 deletions

View File

@ -2341,6 +2341,19 @@ StringIdx Worker::GetLocationForAddress( uint64_t address, uint32_t& line ) cons
}
}
const Vector<uint64_t>* Worker::GetAddressesForLocation( uint32_t fileStringIdx, uint32_t line ) const
{
auto it = m_data.locationCodeAddressList.find( PackFileLine( fileStringIdx, line ) );
if( it == m_data.locationCodeAddressList.end() )
{
return nullptr;
}
else
{
return &it->second;
}
}
int64_t Worker::GetZoneEnd( const ZoneEvent& ev )
{
auto ptr = &ev;

View File

@ -438,6 +438,7 @@ public:
const char* GetSymbolCode( uint64_t sym, uint32_t& len ) const;
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;
#ifndef TRACY_NO_STATISTICS
const VarArray<CallstackFrameId>& GetParentCallstack( uint32_t idx ) const { return *m_data.parentCallstackPayload[idx]; }