From f07eebebf7509e8e75af5fde0d3b4a2876da62d3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 5 Aug 2020 15:34:39 +0200 Subject: [PATCH] ETW threads are time critical. --- client/TracySysTrace.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index fef0f128..7487ad48 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -322,6 +322,7 @@ static void SetupVsync() s_threadVsync = (Thread*)tracy_malloc( sizeof( Thread ) ); new(s_threadVsync) Thread( [] (void*) { ThreadExitHandler threadExitHandler; + SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL ); SetThreadName( "Tracy Vsync" ); ProcessTrace( &s_traceHandleVsync2, 1, nullptr, nullptr ); }, nullptr ); @@ -457,6 +458,7 @@ void SysTraceStop() void SysTraceWorker( void* ptr ) { ThreadExitHandler threadExitHandler; + SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL ); SetThreadName( "Tracy SysTrace" ); ProcessTrace( &s_traceHandle2, 1, 0, 0 ); ControlTrace( 0, KERNEL_LOGGER_NAME, s_prop, EVENT_TRACE_CONTROL_STOP );