diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index 6fe78680..d5a9bdaa 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1403,6 +1403,7 @@ Profiler::Profiler() , m_shutdown( false ) , m_shutdownManual( false ) , m_shutdownFinished( false ) + , m_isActive( true ) , m_sock( nullptr ) , m_broadcast( nullptr ) , m_noExit( false ) diff --git a/public/client/TracyProfiler.hpp b/public/client/TracyProfiler.hpp index 8d169058..9ebb7ede 100644 --- a/public/client/TracyProfiler.hpp +++ b/public/client/TracyProfiler.hpp @@ -770,6 +770,10 @@ public: void RequestShutdown() { m_shutdown.store( true, std::memory_order_relaxed ); m_shutdownManual.store( true, std::memory_order_relaxed ); } bool HasShutdownFinished() const { return m_shutdownFinished.load( std::memory_order_relaxed ); } + void Suspend() { m_isActive.store( false, std::memory_order_relaxed ); } + void Resume() { m_isActive.store( true, std::memory_order_relaxed ); } + tracy_force_inline bool IsActive() const { return m_isActive.load( std::memory_order_relaxed ); } + void SendString( uint64_t str, const char* ptr, QueueType type ) { SendString( str, ptr, strlen( ptr ), type ); } void SendString( uint64_t str, const char* ptr, size_t len, QueueType type ); void SendSingleString( const char* ptr ) { SendSingleString( ptr, strlen( ptr ) ); } @@ -998,6 +1002,7 @@ private: std::atomic m_shutdown; std::atomic m_shutdownManual; std::atomic m_shutdownFinished; + std::atomic m_isActive; Socket* m_sock; UdpBroadcast* m_broadcast; bool m_noExit;