mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Stack frame accessor.
This commit is contained in:
parent
0c0afa5ac7
commit
4000f27e15
@ -721,6 +721,19 @@ std::pair <int, int> Worker::GetFrameRange( int64_t from, int64_t to )
|
||||
return std::make_pair( zbegin, zend );
|
||||
}
|
||||
|
||||
const CallstackFrame* Worker::GetCallstackFrame( uint64_t ptr )
|
||||
{
|
||||
auto it = m_data.callstackFrameMap.find( ptr );
|
||||
if( it == m_data.callstackFrameMap.end() )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEnd( const ZoneEvent& ev )
|
||||
{
|
||||
auto ptr = &ev;
|
||||
|
@ -145,7 +145,9 @@ public:
|
||||
const Vector<PlotData*>& GetPlots() const { return m_data.plots; }
|
||||
const Vector<ThreadData*>& GetThreadData() const { return m_data.threads; }
|
||||
const MemData& GetMemData() const { return m_data.memory; }
|
||||
|
||||
const VarArray<uint64_t>& GetCallstack( uint32_t idx ) { return *m_data.callstackPayload[idx]; }
|
||||
const CallstackFrame* GetCallstackFrame( uint64_t ptr );
|
||||
|
||||
// Some zones may have incomplete timing data (only start time is available, end hasn't arrived yet).
|
||||
// GetZoneEnd() will try to infer the end time by looking at child zones (parent zone can't end
|
||||
|
Loading…
Reference in New Issue
Block a user