From ecb4a0527a5330aa9ec472a0b74d0ef2e9cd9db3 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 5 Jan 2023 21:43:33 +0100 Subject: [PATCH] Do not retrieve call stacks if sampling is not requested. --- public/client/TracySysTrace.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/client/TracySysTrace.cpp b/public/client/TracySysTrace.cpp index 23b1020a..9211bc8e 100644 --- a/public/client/TracySysTrace.cpp +++ b/public/client/TracySysTrace.cpp @@ -409,6 +409,7 @@ bool SysTraceStart( int64_t& samplingPeriod ) return false; } +#ifndef TRACY_NO_SAMPLING if( isOs64Bit ) { CLASSIC_EVENT_ID stackId[2] = {}; @@ -423,6 +424,7 @@ bool SysTraceStart( int64_t& samplingPeriod ) return false; } } +#endif #ifdef UNICODE WCHAR KernelLoggerName[sizeof( KERNEL_LOGGER_NAME )];