From a194c937400418f37eae1ee5224acd6d93731f12 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 14 Aug 2019 20:26:55 +0200 Subject: [PATCH] Allow checking if context switch data is available. --- server/TracyWorker.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 73a343fa..74fa9e64 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -278,6 +278,7 @@ public: uint64_t GetLockCount() const; uint64_t GetPlotCount() const; uint64_t GetContextSwitchCount() const; + bool HasContextSwitches() const { return !m_data.ctxSwitch.empty(); } uint64_t GetSrcLocCount() const { return m_data.sourceLocationPayload.size() + m_data.sourceLocation.size(); } uint64_t GetCallstackPayloadCount() const { return m_data.callstackPayload.size() - 1; } uint64_t GetCallstackFrameCount() const { return m_data.callstackFrameMap.size(); }