diff --git a/public/client/TracyCallstack.hpp b/public/client/TracyCallstack.hpp index c7e104ca..33855857 100644 --- a/public/client/TracyCallstack.hpp +++ b/public/client/TracyCallstack.hpp @@ -9,7 +9,7 @@ namespace tracy { -static constexpr bool has_stacktrace() { return false; } +static constexpr bool has_callstack() { return false; } static tracy_force_inline void* Callstack( int /*depth*/ ) { return nullptr; } } @@ -39,7 +39,7 @@ static tracy_force_inline void* Callstack( int /*depth*/ ) { return nullptr; } namespace tracy { -static constexpr bool has_stacktrace() { return true; } +static constexpr bool has_callstack() { return true; } struct CallstackSymbolData { diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index a62480ec..4414b000 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -4291,7 +4291,7 @@ TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___trac TracyQueueCommitC( zoneValidationThread ); } #endif - if (depth > 0 && tracy::has_stacktrace()) { + if (depth > 0 && tracy::has_callstack()) { tracy::GetProfiler().SendCallstack( depth ); { TracyQueuePrepareC( tracy::QueueType::ZoneBeginCallstack ); @@ -4363,7 +4363,7 @@ TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_alloc_callstack( uint64_t srclo TracyQueueCommitC( zoneValidationThread ); } #endif - if (depth > 0 && tracy::has_stacktrace()) { + if (depth > 0 && tracy::has_callstack()) { tracy::GetProfiler().SendCallstack( depth ); { TracyQueuePrepareC( tracy::QueueType::ZoneBeginAllocSrcLocCallstack ); @@ -4477,7 +4477,7 @@ TRACY_API void ___tracy_emit_zone_value( TracyCZoneCtx ctx, uint64_t value ) TRACY_API void ___tracy_emit_memory_alloc( const void* ptr, size_t size, int secure ) { tracy::Profiler::MemAlloc( ptr, size, secure != 0 ); } TRACY_API void ___tracy_emit_memory_alloc_callstack( const void* ptr, size_t size, int depth, int secure ) { - if( depth > 0 && tracy::has_stacktrace() ) + if( depth > 0 && tracy::has_callstack() ) { tracy::Profiler::MemAllocCallstack( ptr, size, depth, secure != 0 ); } @@ -4489,7 +4489,7 @@ TRACY_API void ___tracy_emit_memory_alloc_callstack( const void* ptr, size_t siz TRACY_API void ___tracy_emit_memory_free( const void* ptr, int secure ) { tracy::Profiler::MemFree( ptr, secure != 0 ); } TRACY_API void ___tracy_emit_memory_free_callstack( const void* ptr, int depth, int secure ) { - if( depth > 0 && tracy::has_stacktrace() ) + if( depth > 0 && tracy::has_callstack() ) { tracy::Profiler::MemFreeCallstack( ptr, depth, secure != 0 ); } @@ -4501,7 +4501,7 @@ TRACY_API void ___tracy_emit_memory_free_callstack( const void* ptr, int depth, TRACY_API void ___tracy_emit_memory_discard( const char* name, int secure ) { tracy::Profiler::MemDiscard( name, secure != 0 ); } TRACY_API void ___tracy_emit_memory_discard_callstack( const char* name, int secure, int depth ) { - if( depth > 0 && tracy::has_stacktrace() ) + if( depth > 0 && tracy::has_callstack() ) { tracy::Profiler::MemDiscardCallstack( name, secure != 0, depth ); } @@ -4513,7 +4513,7 @@ TRACY_API void ___tracy_emit_memory_discard_callstack( const char* name, int sec TRACY_API void ___tracy_emit_memory_alloc_named( const void* ptr, size_t size, int secure, const char* name ) { tracy::Profiler::MemAllocNamed( ptr, size, secure != 0, name ); } TRACY_API void ___tracy_emit_memory_alloc_callstack_named( const void* ptr, size_t size, int depth, int secure, const char* name ) { - if( depth > 0 && tracy::has_stacktrace() ) + if( depth > 0 && tracy::has_callstack() ) { tracy::Profiler::MemAllocCallstackNamed( ptr, size, depth, secure != 0, name ); } @@ -4525,7 +4525,7 @@ TRACY_API void ___tracy_emit_memory_alloc_callstack_named( const void* ptr, size TRACY_API void ___tracy_emit_memory_free_named( const void* ptr, int secure, const char* name ) { tracy::Profiler::MemFreeNamed( ptr, secure != 0, name ); } TRACY_API void ___tracy_emit_memory_free_callstack_named( const void* ptr, int depth, int secure, const char* name ) { - if( depth > 0 && tracy::has_stacktrace() ) + if( depth > 0 && tracy::has_callstack() ) { tracy::Profiler::MemFreeCallstackNamed( ptr, depth, secure != 0, name ); } diff --git a/public/client/TracyProfiler.hpp b/public/client/TracyProfiler.hpp index a97cfc76..00b4171c 100644 --- a/public/client/TracyProfiler.hpp +++ b/public/client/TracyProfiler.hpp @@ -513,7 +513,7 @@ public: static tracy_force_inline void MemAllocCallstack( const void* ptr, size_t size, int depth, bool secure ) { if( secure && !ProfilerAvailable() ) return; - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { auto& profiler = GetProfiler(); # ifdef TRACY_ON_DEMAND if( !profiler.IsConnected() ) return; @@ -539,7 +539,7 @@ public: MemFree( ptr, secure ); return; } - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { auto& profiler = GetProfiler(); # ifdef TRACY_ON_DEMAND if( !profiler.IsConnected() ) return; @@ -588,7 +588,7 @@ public: static tracy_force_inline void MemAllocCallstackNamed( const void* ptr, size_t size, int depth, bool secure, const char* name ) { if( secure && !ProfilerAvailable() ) return; - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { auto& profiler = GetProfiler(); # ifdef TRACY_ON_DEMAND if( !profiler.IsConnected() ) return; @@ -610,7 +610,7 @@ public: static tracy_force_inline void MemFreeCallstackNamed( const void* ptr, int depth, bool secure, const char* name ) { if( secure && !ProfilerAvailable() ) return; - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { auto& profiler = GetProfiler(); # ifdef TRACY_ON_DEMAND if( !profiler.IsConnected() ) return; @@ -645,7 +645,7 @@ public: static tracy_force_inline void MemDiscardCallstack( const char* name, bool secure, int depth ) { if( secure && !ProfilerAvailable() ) return; - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { # ifdef TRACY_ON_DEMAND if( !GetProfiler().IsConnected() ) return; # endif @@ -664,7 +664,7 @@ public: static tracy_force_inline void SendCallstack( int depth ) { - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { auto ptr = Callstack( depth ); TracyQueuePrepare( QueueType::Callstack ); MemWrite( &item->callstackFat.ptr, (uint64_t)ptr ); @@ -904,7 +904,7 @@ private: static tracy_force_inline void SendCallstackSerial( void* ptr ) { - if (has_stacktrace()) { + if (has_callstack()) { auto item = GetProfiler().m_serialQueue.prepare_next(); MemWrite( &item->hdr.type, QueueType::CallstackSerial ); MemWrite( &item->callstackFat.ptr, (uint64_t)ptr ); diff --git a/public/client/TracyScoped.hpp b/public/client/TracyScoped.hpp index c08b46a6..cfe3797e 100644 --- a/public/client/TracyScoped.hpp +++ b/public/client/TracyScoped.hpp @@ -34,7 +34,7 @@ public: #ifdef TRACY_ON_DEMAND m_connectionId = GetProfiler().ConnectionId(); #endif - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { GetProfiler().SendCallstack( depth ); TracyQueuePrepare( QueueType::ZoneBeginCallstack ); @@ -60,7 +60,7 @@ public: #ifdef TRACY_ON_DEMAND m_connectionId = GetProfiler().ConnectionId(); #endif - if (depth > 0 && has_stacktrace()) { + if (depth > 0 && has_callstack()) { GetProfiler().SendCallstack( depth ); TracyQueuePrepare( QueueType::ZoneBeginAllocSrcLocCallstack );