From 99b8c4c77e64e21fb3b5de048b87ff2ff9b14b12 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Oct 2017 17:42:22 +0200 Subject: [PATCH] Prevent fake loop from optimizing out. --- client/TracyProfiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index ae2b5626..bfa7b3be 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -321,11 +321,11 @@ void Profiler::CalibrateTimer() class FakeZone { public: - FakeZone( const SourceLocation* srcloc ) {} + FakeZone( const SourceLocation* srcloc ) : m_id( (uint64_t)srcloc ) {} ~FakeZone() {} private: - uint64_t m_id; + volatile uint64_t m_id; }; void Profiler::CalibrateDelay()