diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 2339003b..3e3392a1 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -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(); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index c4ef69ce..2dd942ce 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -274,6 +274,7 @@ public: 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(); } + 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;