From 93b6d88c4cc0c97558277793764da37474dd2735 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 2 Nov 2021 01:46:29 +0100 Subject: [PATCH] Save/load fiber thread flag. --- server/TracyVersion.hpp | 2 +- server/TracyWorker.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index 738027a9..49d7bea8 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 7 }; -enum { Patch = 10 }; +enum { Patch = 11 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 63690f3b..039637a8 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -933,14 +933,20 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) { auto td = m_slab.AllocInit(); uint64_t tid; - if( fileVer >= FileVersion( 0, 7, 9 ) ) + if( fileVer >= FileVersion( 0, 7, 11 ) ) + { + f.Read4( tid, td->count, td->kernelSampleCnt, td->isFiber ); + } + else if( fileVer >= FileVersion( 0, 7, 9 ) ) { f.Read3( tid, td->count, td->kernelSampleCnt ); + td->isFiber = 0; } else { f.Read2( tid, td->count ); td->kernelSampleCnt = 0; + td->isFiber = 0; } td->id = tid; m_data.zonesCnt += td->count; @@ -7562,6 +7568,7 @@ void Worker::Write( FileWrite& f, bool fiDict ) f.Write( &thread->id, sizeof( thread->id ) ); f.Write( &thread->count, sizeof( thread->count ) ); f.Write( &thread->kernelSampleCnt, sizeof( thread->kernelSampleCnt ) ); + f.Write( &thread->isFiber, sizeof( thread->isFiber ) ); WriteTimeline( f, thread->timeline, refTime ); sz = thread->messages.size(); f.Write( &sz, sizeof( sz ) );