From 34b80ac52f55002c7fed5461a15b81182c1a96ad Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 18 Apr 2021 15:03:42 +0200 Subject: [PATCH] Add child samples count getters. --- server/TracyWorker.cpp | 10 ++++++++++ server/TracyWorker.hpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index c535054b..d2e47c56 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -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 ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index cadbe209..914e2b20 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -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& GetFrames() const { return m_data.frames.Data(); }