From fc8fc8090024053c75e78a44b17220a0079686b9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 2 Jan 2024 20:08:41 +0100 Subject: [PATCH] Drop support for pre-0.9.0 traces. --- server/TracyWorker.cpp | 115 ++++++++--------------------------------- 1 file changed, 21 insertions(+), 94 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 88e512a9..fc51c06e 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -61,7 +61,7 @@ static bool SourceFileValid( const char* fn, uint64_t olderThan ) static const uint8_t FileHeader[8] { 't', 'r', 'a', 'c', 'y', Version::Major, Version::Minor, Version::Patch }; enum { FileHeaderMagic = 5 }; static const int CurrentVersion = FileVersion( Version::Major, Version::Minor, Version::Patch ); -static const int MinSupportedVersion = FileVersion( 0, 8, 0 ); +static const int MinSupportedVersion = FileVersion( 0, 9, 0 ); static void UpdateLockCountLockable( LockMap& lockmap, size_t pos ) @@ -1096,76 +1096,34 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks, bool allow { m_data.plots.Data().reserve( sz ); s_loadProgress.subTotal.store( sz, std::memory_order_relaxed ); - if( fileVer >= FileVersion( 0, 8, 3 ) ) + for( uint64_t i=0; i(); + uint64_t psz; + f.Read10( pd->type, pd->format, pd->showSteps, pd->fill, pd->color, pd->name, pd->min, pd->max, pd->sum, psz ); + pd->data.reserve_exact( psz, m_slab ); + auto ptr = pd->data.data(); + int64_t refTime = 0; + for( uint64_t j=0; j(); - uint64_t psz; - f.Read10( pd->type, pd->format, pd->showSteps, pd->fill, pd->color, pd->name, pd->min, pd->max, pd->sum, psz ); - pd->data.reserve_exact( psz, m_slab ); - auto ptr = pd->data.data(); - int64_t refTime = 0; - for( uint64_t j=0; jval ); - refTime += t; - ptr->time = refTime; - ptr++; - } - m_data.plots.Data().push_back_no_space_check( pd ); - } - } - else - { - for( uint64_t i=0; i(); - uint64_t psz; - f.Read7( pd->type, pd->format, pd->name, pd->min, pd->max, pd->sum, psz ); - pd->showSteps = false; - pd->fill = true; - pd->color = 0; - pd->data.reserve_exact( psz, m_slab ); - auto ptr = pd->data.data(); - int64_t refTime = 0; - for( uint64_t j=0; jval ); - refTime += t; - ptr->time = refTime; - ptr++; - } - m_data.plots.Data().push_back_no_space_check( pd ); + int64_t t; + f.Read2( t, ptr->val ); + refTime += t; + ptr->time = refTime; + ptr++; } + m_data.plots.Data().push_back_no_space_check( pd ); } } else { - if( fileVer >= FileVersion( 0, 8, 3 ) ) + for( uint64_t i=0; i(); - cs->size = 1; - cs->data = m_slab.AllocInit( 1 ); - cs->data->file = StringIdx( fidx ); - cs->data->line = line; - cs->data->symAddr = 0; - m_data.callstackFrameMap.emplace( frameId, cs ); - } - } - } - } - f.Read( sz ); m_data.codeSymbolMap.reserve( sz ); for( uint64_t i=0; i