From 8d39f91c6e47efeb4d5a551ff38f92b2f8edefae Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 31 Jan 2021 17:51:16 +0100 Subject: [PATCH] Save/load executable image mtime. --- server/TracyVersion.hpp | 2 +- server/TracyWorker.cpp | 11 +++++++++++ server/TracyWorker.hpp | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/server/TracyVersion.hpp b/server/TracyVersion.hpp index 4b81c7c8..50f18442 100644 --- a/server/TracyVersion.hpp +++ b/server/TracyVersion.hpp @@ -7,7 +7,7 @@ namespace Version { enum { Major = 0 }; enum { Minor = 7 }; -enum { Patch = 5 }; +enum { Patch = 6 }; } } diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 98fb1a2f..616dd851 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -282,6 +282,7 @@ Worker::Worker( const char* name, const char* program, const std::vector= FileVersion( 0, 7, 6 ) ) + { + f.Read( m_executableTime ); + } + else + { + m_executableTime = 0; + } { f.Read( sz ); assert( sz < 1024 ); @@ -2699,6 +2708,7 @@ void Worker::Exec() m_onDemand = welcome.onDemand; m_captureProgram = welcome.programName; m_captureTime = welcome.epoch; + m_executableTime = welcome.exectime; m_ignoreMemFreeFaults = welcome.onDemand || welcome.isApple; m_data.cpuArch = (CpuArchitecture)welcome.cpuArch; m_codeTransfer = welcome.codeTransfer; @@ -6774,6 +6784,7 @@ void Worker::Write( FileWrite& f ) f.Write( m_captureProgram.c_str(), sz ); f.Write( &m_captureTime, sizeof( m_captureTime ) ); + f.Write( &m_executableTime, sizeof( m_executableTime ) ); sz = m_hostInfo.size(); f.Write( &sz, sizeof( sz ) ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 28b2403e..99da4393 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -841,6 +841,7 @@ private: std::string m_captureName; std::string m_captureProgram; uint64_t m_captureTime; + uint64_t m_executableTime; std::string m_hostInfo; uint64_t m_pid; int64_t m_samplingPeriod;