diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index 304d7e03..9a1a7172 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 4 }; -enum { Patch = 6 }; +enum { Patch = 7 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 584e2891..109ee6c7 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -761,6 +761,12 @@ Worker::Worker( FileRead& f, EventType::Type eventMask ) } s_loadProgress.progress.store( LoadProgress::Zones, std::memory_order_relaxed ); + if( fileVer >= FileVersion( 0, 4, 7 ) ) + { + f.Read( sz ); + s_loadProgress.subTotal.store( sz, std::memory_order_relaxed ); + s_loadProgress.subProgress.store( 0, std::memory_order_relaxed ); + } f.Read( sz ); m_data.threads.reserve_exact( sz, m_slab ); for( uint64_t i=0; icount ); uint64_t tsz; f.Read( tsz ); - s_loadProgress.subTotal.store( td->count, std::memory_order_relaxed ); - s_loadProgress.subProgress.store( 0, std::memory_order_relaxed ); + if( fileVer < FileVersion( 0, 4, 7 ) ) + { + s_loadProgress.subTotal.store( td->count, std::memory_order_relaxed ); + s_loadProgress.subProgress.store( 0, std::memory_order_relaxed ); + } if( tsz != 0 ) { if( fileVer <= FileVersion( 0, 4, 1 ) ) @@ -808,6 +817,12 @@ Worker::Worker( FileRead& f, EventType::Type eventMask ) } s_loadProgress.progress.store( LoadProgress::GpuZones, std::memory_order_relaxed ); + if( fileVer >= FileVersion( 0, 4, 7 ) ) + { + f.Read( sz ); + s_loadProgress.subTotal.store( sz, std::memory_order_relaxed ); + s_loadProgress.subProgress.store( 0, std::memory_order_relaxed ); + } f.Read( sz ); m_data.gpuData.reserve_exact( sz, m_slab ); for( uint64_t i=0; ithread ); f.Read( ctx->accuracyBits ); f.Read( ctx->count ); - s_loadProgress.subTotal.store( ctx->count, std::memory_order_relaxed ); - s_loadProgress.subProgress.store( 0, std::memory_order_relaxed ); + if( fileVer < FileVersion( 0, 4, 7 ) ) + { + s_loadProgress.subTotal.store( ctx->count, std::memory_order_relaxed ); + s_loadProgress.subProgress.store( 0, std::memory_order_relaxed ); + } int64_t refTime = 0; int64_t refGpuTime = 0; if( fileVer <= FileVersion( 0, 3, 1 ) ) @@ -3997,6 +4015,9 @@ void Worker::Write( FileWrite& f ) } } + sz = 0; + for( auto& v : m_data.threads ) sz += v->count; + f.Write( &sz, sizeof( sz ) ); sz = m_data.threads.size(); f.Write( &sz, sizeof( sz ) ); for( auto& thread : m_data.threads ) @@ -4014,6 +4035,9 @@ void Worker::Write( FileWrite& f ) } } + sz = 0; + for( auto& v : m_data.gpuData ) sz += v->count; + f.Write( &sz, sizeof( sz ) ); sz = m_data.gpuData.size(); f.Write( &sz, sizeof( sz ) ); for( auto& ctx : m_data.gpuData )