mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add context switch accessor.
This commit is contained in:
parent
419f74280d
commit
0b03fed61c
@ -1246,6 +1246,19 @@ uint64_t Worker::GetPlotCount() const
|
||||
return cnt;
|
||||
}
|
||||
|
||||
const ContextSwitch* const Worker::GetContextSwitchData( uint64_t thread ) const
|
||||
{
|
||||
auto it = m_data.ctxSwitch.find( thread );
|
||||
if( it != m_data.ctxSwitch.end() )
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
size_t Worker::GetFullFrameCount( const FrameData& fd ) const
|
||||
{
|
||||
const auto sz = fd.frames.size();
|
||||
|
@ -274,6 +274,7 @@ public:
|
||||
uint64_t GetFrameOffset() const { return m_data.frameOffset; }
|
||||
const FrameData* GetFramesBase() const { return m_data.framesBase; }
|
||||
const Vector<FrameData*>& GetFrames() const { return m_data.frames.Data(); }
|
||||
const ContextSwitch* const GetContextSwitchData( uint64_t thread ) const;
|
||||
|
||||
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
|
||||
int64_t GetFrameBegin( const FrameData& fd, size_t idx ) const;
|
||||
|
Loading…
Reference in New Issue
Block a user