diff --git a/public/TracyClient.cpp b/public/TracyClient.cpp index 77f81a4a..26387b76 100644 --- a/public/TracyClient.cpp +++ b/public/TracyClient.cpp @@ -22,6 +22,7 @@ #include "common/tracy_lz4.cpp" #include "client/TracyProfiler.cpp" #include "client/TracyCallstack.cpp" +#include "client/TracySysPower.cpp" #include "client/TracySysTime.cpp" #include "client/TracySysTrace.cpp" #include "common/TracySocket.cpp" diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index 38b5ea13..a25bcf7f 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1711,6 +1711,9 @@ void Profiler::Worker() if( m_sock ) break; #ifndef TRACY_ON_DEMAND ProcessSysTime(); +# ifdef TRACY_HAS_SYSPOWER + m_sysPower.Tick(); +# endif #endif if( m_broadcast ) @@ -1828,6 +1831,9 @@ void Profiler::Worker() for(;;) { ProcessSysTime(); +#ifdef TRACY_HAS_SYSPOWER + m_sysPower.Tick(); +#endif const auto status = Dequeue( token ); const auto serialStatus = DequeueSerial(); if( status == DequeueStatus::ConnectionLost || serialStatus == DequeueStatus::ConnectionLost ) diff --git a/public/client/TracyProfiler.hpp b/public/client/TracyProfiler.hpp index 1ed66f66..eed88589 100644 --- a/public/client/TracyProfiler.hpp +++ b/public/client/TracyProfiler.hpp @@ -10,6 +10,7 @@ #include "tracy_concurrentqueue.h" #include "tracy_SPSCQueue.h" #include "TracyCallstack.hpp" +#include "TracySysPower.hpp" #include "TracySysTime.hpp" #include "TracyFastVector.hpp" #include "../common/TracyQueue.hpp" @@ -941,6 +942,10 @@ private: void ProcessSysTime() {} #endif +#ifdef TRACY_HAS_SYSPOWER + SysPower m_sysPower; +#endif + ParameterCallback m_paramCallback; void* m_paramCallbackData; SourceContentsCallback m_sourceCallback; diff --git a/public/client/TracySysPower.cpp b/public/client/TracySysPower.cpp new file mode 100644 index 00000000..1d4a3cdc --- /dev/null +++ b/public/client/TracySysPower.cpp @@ -0,0 +1,22 @@ +#include "TracySysPower.hpp" + +#ifdef TRACY_HAS_SYSPOWER + +namespace tracy +{ + +SysPower::SysPower() +{ +} + +SysPower::~SysPower() +{ +} + +void SysPower::Tick() +{ +} + +} + +#endif diff --git a/public/client/TracySysPower.hpp b/public/client/TracySysPower.hpp new file mode 100644 index 00000000..90c42352 --- /dev/null +++ b/public/client/TracySysPower.hpp @@ -0,0 +1,25 @@ +#ifndef __TRACYSYSPOWER_HPP__ +#define __TRACYSYSPOWER_HPP__ + +#if defined __linux__ +# define TRACY_HAS_SYSPOWER +#endif + +#ifdef TRACY_HAS_SYSPOWER + +namespace tracy +{ + +class SysPower +{ +public: + SysPower(); + ~SysPower(); + + void Tick(); +}; + +} +#endif + +#endif