From 562e675a0eb6c357e0a46a148c779ba4b2c3735d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 2 Apr 2020 12:12:10 +0200 Subject: [PATCH] Save/load code location data. --- server/TracyVersion.hpp | 2 +- server/TracyWorker.cpp | 54 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index d2e9b40d..059efb41 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 6 }; -enum { Patch = 8 }; +enum { Patch = 9 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 4360e218..4b093d27 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1750,6 +1750,43 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) } } + if( fileVer >= FileVersion( 0, 6, 9 ) ) + { + f.Read( sz ); + if( eventMask & EventType::SymbolCode ) + { + m_data.locationCodeAddressList.reserve( sz ); + for( uint64_t i=0; i data; + data.reserve_exact( lsz, m_slab ); + uint64_t ref = 0; + for( uint16_t j=0; j( std::chrono::high_resolution_clock::now() - loadStart ).count(); @@ -6987,6 +7024,23 @@ void Worker::Write( FileWrite& f ) f.Write( &v.second.len, sizeof( v.second.len ) ); f.Write( v.second.data, v.second.len ); } + + sz = m_data.locationCodeAddressList.size(); + f.Write( &sz, sizeof( sz ) ); + for( auto& v : m_data.locationCodeAddressList ) + { + f.Write( &v.first, sizeof( v.first ) ); + uint16_t lsz = uint16_t( v.second.size() ); + f.Write( &lsz, sizeof( lsz ) ); + uint64_t ref = 0; + const uint64_t* ptr = v.second.data(); + for( uint16_t i=0; i>& vec, int64_t& refTime )