diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 85861661..abad845f 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1576,6 +1576,9 @@ void Worker::Process( const QueueItem& ev ) case QueueType::CallstackMemory: ProcessCallstackMemory( ev.callstackMemory ); break; + case QueueType::Callstack: + ProcessCallstack( ev.callstack ); + break; case QueueType::CallstackFrame: ProcessCallstackFrame( ev.callstackFrame ); break; @@ -2147,6 +2150,28 @@ void Worker::ProcessCallstackMemory( const QueueCallstackMemory& ev ) m_pendingCallstacks.erase( it ); } +void Worker::ProcessCallstack( const QueueCallstack& ev ) +{ + auto it = m_pendingCallstacks.find( ev.ptr ); + assert( it != m_pendingCallstacks.end() ); + + auto nit = m_nextCallstack.find( ev.thread ); + assert( nit != m_nextCallstack.end() ); + auto& next = nit->second; + + switch( next.type ) + { + case NextCallstackType::Zone: + next.zone->callstack = it->second; + break; + default: + assert( false ); + break; + } + + m_pendingCallstacks.erase( it ); +} + void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev ) { assert( m_pendingCallstackFrames > 0 ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index bc64f4f1..0b049e9b 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -237,6 +237,7 @@ private: tracy_force_inline void ProcessMemAllocCallstack( const QueueMemAlloc& ev ); tracy_force_inline void ProcessMemFreeCallstack( const QueueMemFree& ev ); tracy_force_inline void ProcessCallstackMemory( const QueueCallstackMemory& ev ); + tracy_force_inline void ProcessCallstack( const QueueCallstack& ev ); tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev ); tracy_force_inline void ProcessZoneBeginImpl( ZoneEvent* zone, const QueueZoneBegin& ev );