mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Add accessors.
This commit is contained in:
parent
103645c2fa
commit
62dbe522c5
@ -1653,6 +1653,13 @@ uint64_t Worker::GetContextSwitchPerCpuCount() const
|
||||
return cnt;
|
||||
}
|
||||
|
||||
uint64_t Worker::GetPidFromTid( uint64_t tid ) const
|
||||
{
|
||||
auto it = m_data.tidToPid.find( tid );
|
||||
if( it == m_data.tidToPid.end() ) return 0;
|
||||
return it->second;
|
||||
}
|
||||
|
||||
const ContextSwitch* const Worker::GetContextSwitchDataImpl( uint64_t thread )
|
||||
{
|
||||
auto it = m_data.ctxSwitch.find( thread );
|
||||
|
@ -301,6 +301,8 @@ public:
|
||||
return GetContextSwitchDataImpl( thread );
|
||||
}
|
||||
const CpuData* GetCpuData() const { return m_data.cpuData; }
|
||||
uint64_t GetPidFromTid( uint64_t tid ) const;
|
||||
const flat_hash_map<uint64_t, CpuThreadData, nohash<uint64_t>>& GetCpuThreadData() const { return m_data.cpuThreadData; }
|
||||
|
||||
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