Add child samples count getters.

This commit is contained in:
Bartosz Taudul 2021-04-18 15:03:42 +02:00
parent 2f6adf3641
commit 34b80ac52f
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 12 additions and 0 deletions

View File

@ -2003,6 +2003,16 @@ uint64_t Worker::GetContextSwitchPerCpuCount() const
return cnt;
}
uint64_t Worker::GetChildSamplesCountFull() const
{
uint64_t cnt = 0;
for( auto& v : m_data.childSamples )
{
cnt += v.second.size();
}
return cnt;
}
uint64_t Worker::GetPidFromTid( uint64_t tid ) const
{
auto it = m_data.tidToPid.find( tid );

View File

@ -445,6 +445,8 @@ public:
uint64_t GetGhostZonesCount() const { return m_data.ghostCnt; }
uint32_t GetFrameImageCount() const { return (uint32_t)m_data.frameImage.size(); }
uint64_t GetStringsCount() const { return m_data.strings.size() + m_data.stringData.size(); }
uint64_t GetChildSamplesCountSyms() const { return m_data.childSamples.size(); }
uint64_t GetChildSamplesCountFull() const;
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(); }