From ba4315c2868ee6c5f79e5e591dddd03d64e378fc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 25 Sep 2020 16:36:03 +0200 Subject: [PATCH] Store memory name in MemData struct. --- server/TracyEvent.hpp | 1 + server/TracyWorker.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index 332629d2..a8a37b83 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -653,6 +653,7 @@ struct MemData uint64_t low = std::numeric_limits::max(); uint64_t usage = 0; PlotData* plot = nullptr; + uint64_t name = 0; }; struct FrameData diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 3991d8e5..ca369a67 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -5284,6 +5284,7 @@ void Worker::ProcessMemAllocNamed( const QueueMemAlloc& ev ) { CheckString( memname ); it = m_data.memNameMap.emplace( memname, m_slab.AllocInit() ).first; + it->second->name = memname; } ProcessMemAllocImpl( memname, *it->second, ev ); } @@ -5304,6 +5305,7 @@ bool Worker::ProcessMemFreeNamed( const QueueMemFree& ev ) { CheckString( memname ); it = m_data.memNameMap.emplace( memname, m_slab.AllocInit() ).first; + it->second->name = memname; } return ProcessMemFreeImpl( memname, *it->second, ev ); } @@ -5326,6 +5328,7 @@ void Worker::ProcessMemAllocCallstackNamed( const QueueMemAlloc& ev ) { CheckString( memname ); it = m_data.memNameMap.emplace( memname, m_slab.AllocInit() ).first; + it->second->name = memname; } m_lastMemActionData = it->second; m_lastMemActionCallstack = it->second->data.size(); @@ -5357,6 +5360,7 @@ void Worker::ProcessMemFreeCallstackNamed( const QueueMemFree& ev ) { CheckString( memname ); it = m_data.memNameMap.emplace( memname, m_slab.AllocInit() ).first; + it->second->name = memname; } if( ProcessMemFreeImpl( memname, *it->second, ev ) ) {