From 2e774f4626506f55d32f146fca9fd7da77cd40cc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 12 Jul 2019 18:45:35 +0200 Subject: [PATCH] Save/load application info. --- server/TracyVersion.hpp | 2 +- server/TracyWorker.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index 678f348f..ae2851ba 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 4 }; -enum { Patch = 10 }; +enum { Patch = 11 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index cb943599..df82cc90 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1237,6 +1237,16 @@ Worker::Worker( FileRead& f, EventType::Type eventMask ) } } + if( fileVer >= FileVersion( 0, 4, 11 ) ) + { + f.Read( sz ); + if( sz > 0 ) + { + m_data.appInfo.reserve_exact( sz, m_slab ); + f.Read( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz ); + } + } + if( fileVer >= FileVersion( 0, 4, 9 ) ) { s_loadProgress.subTotal.store( 0, std::memory_order_relaxed ); @@ -4428,6 +4438,10 @@ void Worker::Write( FileWrite& f ) f.Write( frame.second->data, sizeof( CallstackFrame ) * frame.second->size ); } + sz = m_data.appInfo.size(); + f.Write( &sz, sizeof( sz ) ); + f.Write( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz ); + sz = m_data.frameImage.size(); f.Write( &sz, sizeof( sz ) ); for( auto& fi : m_data.frameImage )