From bff6eb4c341249bf1c11966e8e7f4cbe26a38fbe Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 29 Jul 2018 14:58:01 +0200 Subject: [PATCH] Save source location zones counts. This allows preallocation of zones-in-source-location vectors. --- server/TracyVersion.hpp | 2 +- server/TracyWorker.cpp | 71 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index 0892686b..fb208e7c 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 3 }; -enum { Patch = 200 }; +enum { Patch = 201 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index c8a20962..7a8a5f30 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -337,13 +337,54 @@ Worker::Worker( FileRead& f, EventType::Type eventMask ) #ifndef TRACY_NO_STATISTICS m_data.sourceLocationZonesReady = false; m_data.sourceLocationZones.reserve( sle + sz ); - for( uint64_t i=1; i= FileVersion( 0, 3, 201 ) ) { - m_data.sourceLocationZones.emplace( int32_t( i ), SourceLocationZones() ); + f.Read( sz ); + for( uint64_t i=0; isecond.zones.reserve( cnt ); + } } - for( uint64_t i=0; i= FileVersion( 0, 3, 201 ) ) + { + f.Read( sz ); + for( uint64_t i=0; i