From 88685440b6a70ccef6ae6ab00ec2899b3f8999dd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 26 Jul 2020 00:41:49 +0200 Subject: [PATCH] Send single string for callstack frame. --- client/TracyProfiler.cpp | 3 +-- common/TracyQueue.hpp | 1 - server/TracyWorker.cpp | 5 +---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index fb6ba1d5..e707573e 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -2404,12 +2404,11 @@ void Profiler::SendCallstackFrame( uint64_t ptr ) { const auto& frame = frameData.data[i]; - SendString( uint64_t( frame.name ), frame.name, QueueType::CustomStringData ); + SendSingleString( frame.name ); SendString( uint64_t( frame.file ), frame.file, QueueType::CustomStringData ); QueueItem item; MemWrite( &item.hdr.type, QueueType::CallstackFrame ); - MemWrite( &item.callstackFrame.name, (uint64_t)frame.name ); MemWrite( &item.callstackFrame.file, (uint64_t)frame.file ); MemWrite( &item.callstackFrame.line, frame.line ); MemWrite( &item.callstackFrame.symAddr, frame.symAddr ); diff --git a/common/TracyQueue.hpp b/common/TracyQueue.hpp index 6a2180b8..803f0aad 100644 --- a/common/TracyQueue.hpp +++ b/common/TracyQueue.hpp @@ -383,7 +383,6 @@ struct QueueCallstackFrameSize struct QueueCallstackFrame { - uint64_t name; uint64_t file; uint32_t line; uint64_t symAddr; diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index a862591a..5666f2d5 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -5435,10 +5435,7 @@ void Worker::ProcessCallstackFrame( const QueueCallstackFrame& ev ) { assert( m_pendingCallstackSubframes > 0 ); - auto nit = m_pendingCustomStrings.find( ev.name ); - assert( nit != m_pendingCustomStrings.end() ); - const auto nitidx = nit->second.idx; - m_pendingCustomStrings.erase( nit ); + const auto nitidx = GetSingleStringIdx(); auto fit = m_pendingCustomStrings.find( ev.file ); assert( fit != m_pendingCustomStrings.end() );