diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/client/TracyProfiler.cpp | 13 | ||||
-rw-r--r-- | public/common/TracyYield.hpp | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index 1e999065..6985cf99 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1483,7 +1483,6 @@ Profiler::~Profiler() #ifdef TRACY_HAS_CALLSTACK s_symbolThread->~Thread(); tracy_free( s_symbolThread ); - s_symbolThreadGone.store( true, std::memory_order_release ); #endif #ifndef TRACY_NO_FRAME_IMAGE @@ -3308,7 +3307,11 @@ void Profiler::SymbolWorker() #ifdef TRACY_ON_DEMAND if( !IsConnected() ) { - if( shouldExit ) return; + if( shouldExit ) + { + s_symbolThreadGone.store( true, std::memory_order_release ); + return; + } while( m_symbolQueue.front() ) m_symbolQueue.pop(); std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) ); continue; @@ -3322,7 +3325,11 @@ void Profiler::SymbolWorker() } else { - if( shouldExit ) return; + if( shouldExit ) + { + s_symbolThreadGone.store( true, std::memory_order_release ); + return; + } std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) ); } } diff --git a/public/common/TracyYield.hpp b/public/common/TracyYield.hpp index 7b8ccef0..035836cd 100644 --- a/public/common/TracyYield.hpp +++ b/public/common/TracyYield.hpp @@ -1,7 +1,7 @@ #ifndef __TRACYYIELD_HPP__ #define __TRACYYIELD_HPP__ -#if defined __SSE2__ || defined _M_AMD64 || _M_IX86_FP == 2 +#if defined __SSE2__ || defined _M_AMD64 || (defined _M_IX86_FP && _M_IX86_FP == 2) # include <emmintrin.h> #else # include <thread> @@ -14,7 +14,7 @@ namespace tracy static tracy_force_inline void YieldThread() { -#if defined __SSE2__ || defined _M_AMD64 || _M_IX86_FP == 2 +#if defined __SSE2__ || defined _M_AMD64 || (defined _M_IX86_FP && _M_IX86_FP == 2) _mm_pause(); #elif defined __aarch64__ asm volatile( "isb" : : ); |