Add accessors for new data.

This commit is contained in:
Bartosz Taudul 2020-02-29 17:58:41 +01:00
parent bc14ca86f3
commit 2589b45af0
2 changed files with 13 additions and 0 deletions

View File

@ -2348,6 +2348,14 @@ const Worker::SourceLocationZones& Worker::GetZonesForSourceLocation( int16_t sr
auto it = m_data.sourceLocationZones.find( srcloc );
return it != m_data.sourceLocationZones.end() ? it->second : empty;
}
const SymbolStats& Worker::GetSymbolStats( uint64_t symAddr ) const
{
assert( AreCallstackSamplesReady() );
auto it = m_data.symbolStats.find( symAddr );
assert( it != m_data.symbolStats.end() );
return it->second;
}
#endif
void Worker::Network()

View File

@ -403,6 +403,10 @@ public:
uint64_t GetCanonicalPointer( const CallstackFrameId& id ) const;
const SymbolData* GetSymbolData( uint64_t sym ) const;
#ifndef TRACY_NO_STATISTICS
const VarArray<CallstackFrameId>& GetParentCallstack( uint32_t idx ) const { return *m_data.parentCallstackPayload[idx]; }
#endif
const CrashEvent& GetCrashEvent() const { return m_data.crashEvent; }
// Some zones may have incomplete timing data (only start time is available, end hasn't arrived yet).
@ -444,6 +448,7 @@ public:
const unordered_flat_map<uint64_t, SymbolData>& GetSymbolMap() const { return m_data.symbolMap; }
const unordered_flat_map<uint64_t, SymbolStats>& GetSymbolStats() const { return m_data.symbolStats; }
const SymbolStats& GetSymbolStats( uint64_t symAddr ) const;
bool AreCallstackSamplesReady() const { return m_data.callstackSamplesReady; }
#endif