feat add tracy profiler
Some checks failed
cpp-template / build (Debug, aarch64-linux-gnu) (push) Failing after 27s
cpp-template / build (Release, mipsel-linux-gnu) (push) Failing after 12m45s
cpp-template / build (Release, host.gcc) (push) Failing after 12m52s
cpp-template / build (Release, arm-linux-gnueabihf) (push) Failing after 12m55s
cpp-template / build (Release, aarch64-linux-gnu) (push) Failing after 13m1s
cpp-template / build (Debug, mipsel-linux-gnu) (push) Failing after 13m6s
cpp-template / build (Debug, host.gcc) (push) Failing after 13m11s
cpp-template / build (Debug, arm-linux-gnueabihf) (push) Failing after 13m19s
Some checks failed
cpp-template / build (Debug, aarch64-linux-gnu) (push) Failing after 27s
cpp-template / build (Release, mipsel-linux-gnu) (push) Failing after 12m45s
cpp-template / build (Release, host.gcc) (push) Failing after 12m52s
cpp-template / build (Release, arm-linux-gnueabihf) (push) Failing after 12m55s
cpp-template / build (Release, aarch64-linux-gnu) (push) Failing after 13m1s
cpp-template / build (Debug, mipsel-linux-gnu) (push) Failing after 13m6s
cpp-template / build (Debug, host.gcc) (push) Failing after 13m11s
cpp-template / build (Debug, arm-linux-gnueabihf) (push) Failing after 13m19s
This commit is contained in:
@@ -58,6 +58,9 @@ TRACY_API bool IsProfilerStarted();
|
||||
# define TracyIsStarted true
|
||||
#endif
|
||||
|
||||
TRACY_API bool BeginSamplingProfiling();
|
||||
TRACY_API void EndSamplingProfiling();
|
||||
|
||||
class GpuCtx;
|
||||
class Profiler;
|
||||
class Socket;
|
||||
@@ -252,6 +255,9 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BeginSamplingProfiling();
|
||||
void EndSamplingProfiling();
|
||||
|
||||
tracy_force_inline uint32_t GetNextZoneId()
|
||||
{
|
||||
return m_zoneId.fetch_add( 1, std::memory_order_relaxed );
|
||||
@@ -720,6 +726,9 @@ public:
|
||||
#ifdef TRACY_FIBERS
|
||||
static tracy_force_inline void EnterFiber( const char* fiber, int32_t groupHint )
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
if( !GetProfiler().IsConnected() ) return;
|
||||
#endif
|
||||
TracyQueuePrepare( QueueType::FiberEnter );
|
||||
MemWrite( &item->fiberEnter.time, GetTime() );
|
||||
MemWrite( &item->fiberEnter.fiber, (uint64_t)fiber );
|
||||
@@ -729,6 +738,9 @@ public:
|
||||
|
||||
static tracy_force_inline void LeaveFiber()
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
if( !GetProfiler().IsConnected() ) return;
|
||||
#endif
|
||||
TracyQueuePrepare( QueueType::FiberLeave );
|
||||
MemWrite( &item->fiberLeave.time, GetTime() );
|
||||
TracyQueueCommit( fiberLeave );
|
||||
@@ -991,7 +1003,6 @@ private:
|
||||
|
||||
double m_timerMul;
|
||||
uint64_t m_resolution;
|
||||
uint64_t m_delay;
|
||||
std::atomic<int64_t> m_timeBegin;
|
||||
uint32_t m_mainThread;
|
||||
uint64_t m_epoch, m_exectime;
|
||||
|
||||
Reference in New Issue
Block a user