diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 238ce251..09654dcd 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1817,6 +1817,8 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token ) ptr = MemRead( &item->callstack.ptr ); SendCallstackPayload( ptr ); tracy_free( (void*)ptr ); + idx++; + MemWrite( &item->hdr.idx, idx ); break; case QueueType::CallstackAlloc: ptr = MemRead( &item->callstackAlloc.nativePtr ); diff --git a/common/TracyQueue.hpp b/common/TracyQueue.hpp index 36bf58b4..e0d1b134 100644 --- a/common/TracyQueue.hpp +++ b/common/TracyQueue.hpp @@ -22,6 +22,7 @@ enum class QueueType : uint8_t CallstackMemory, CallstackMemoryLean, Callstack, + CallstackLean, CallstackAlloc, CallstackSample, FrameImage, @@ -485,7 +486,8 @@ static constexpr size_t QueueDataSize[] = { sizeof( QueueHeader ) + sizeof( QueueZoneBeginLean ), // lean allocated source location, callstack sizeof( QueueHeader ) + sizeof( QueueCallstackMemory ), // not for network transfer sizeof( QueueHeader ), // lean callstack memory - sizeof( QueueHeader ) + sizeof( QueueCallstack ), + sizeof( QueueHeader ) + sizeof( QueueCallstack ), // not for network transfer + sizeof( QueueHeader ), // lean callstack sizeof( QueueHeader ) + sizeof( QueueCallstackAlloc ), sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), sizeof( QueueHeader ) + sizeof( QueueFrameImage ), diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index fe2da5cf..11b5c487 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -4185,8 +4185,8 @@ bool Worker::Process( const QueueItem& ev ) case QueueType::CallstackMemoryLean: ProcessCallstackMemory(); break; - case QueueType::Callstack: - ProcessCallstack( ev.callstack ); + case QueueType::CallstackLean: + ProcessCallstack(); break; case QueueType::CallstackAlloc: ProcessCallstackAlloc( ev.callstackAlloc ); @@ -5334,9 +5334,9 @@ void Worker::ProcessCallstackMemory() } } -void Worker::ProcessCallstack( const QueueCallstack& ev ) +void Worker::ProcessCallstack() { - assert( m_pendingCallstackPtr == ev.ptr ); + assert( m_pendingCallstackPtr != 0 ); m_pendingCallstackPtr = 0; auto nit = m_nextCallstack.find( m_threadCtx ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 63043c48..ee24a452 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -600,7 +600,7 @@ private: tracy_force_inline void ProcessMemAllocCallstack( const QueueMemAlloc& ev ); tracy_force_inline void ProcessMemFreeCallstack( const QueueMemFree& ev ); tracy_force_inline void ProcessCallstackMemory(); - tracy_force_inline void ProcessCallstack( const QueueCallstack& ev ); + tracy_force_inline void ProcessCallstack(); tracy_force_inline void ProcessCallstackAlloc( const QueueCallstackAlloc& ev ); tracy_force_inline void ProcessCallstackSample( const QueueCallstackSample& ev ); tracy_force_inline void ProcessCallstackFrameSize( const QueueCallstackFrameSize& ev );