Add symbol instruction pointers map accessor.

This commit is contained in:
Bartosz Taudul 2020-03-25 01:08:29 +01:00
parent 4c92a2619f
commit c603eaa1b6
2 changed files with 15 additions and 0 deletions

View File

@ -2488,6 +2488,20 @@ const SymbolStats* Worker::GetSymbolStats( uint64_t symAddr ) const
return &it->second; return &it->second;
} }
} }
const unordered_flat_map<CallstackFrameId, uint32_t, Worker::CallstackFrameIdHash, Worker::CallstackFrameIdCompare>* Worker::GetSymbolInstructionPointers( uint64_t symAddr ) const
{
assert( AreCallstackSamplesReady() );
auto it = m_data.instructionPointersMap.find( symAddr );
if( it == m_data.instructionPointersMap.end() )
{
return nullptr;
}
else
{
return &it->second;
}
}
#endif #endif
void Worker::Network() void Worker::Network()

View File

@ -466,6 +466,7 @@ public:
const unordered_flat_map<uint64_t, SymbolData>& GetSymbolMap() const { return m_data.symbolMap; } 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 unordered_flat_map<uint64_t, SymbolStats>& GetSymbolStats() const { return m_data.symbolStats; }
const SymbolStats* GetSymbolStats( uint64_t symAddr ) const; const SymbolStats* GetSymbolStats( uint64_t symAddr ) const;
const unordered_flat_map<CallstackFrameId, uint32_t, CallstackFrameIdHash, CallstackFrameIdCompare>* GetSymbolInstructionPointers( uint64_t symAddr ) const;
bool AreCallstackSamplesReady() const { return m_data.callstackSamplesReady; } bool AreCallstackSamplesReady() const { return m_data.callstackSamplesReady; }
bool AreGhostZonesReady() const { return m_data.ghostZonesReady; } bool AreGhostZonesReady() const { return m_data.ghostZonesReady; }
#endif #endif