From e920b5cf64bc8d10a9db10a9b24a8ee78584de9a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 5 Nov 2020 23:59:52 +0100 Subject: [PATCH] Allow disabling call stack sampling. Only on Windows for now. --- client/TracySysTrace.cpp | 2 ++ manual/tracy.tex | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index 64ce3540..b03beb56 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -372,7 +372,9 @@ bool SysTraceStart( int64_t& samplingPeriod ) #ifndef TRACY_NO_CONTEXT_SWITCH flags = EVENT_TRACE_FLAG_CSWITCH | EVENT_TRACE_FLAG_DISPATCHER | EVENT_TRACE_FLAG_THREAD; #endif +#ifndef TRACY_NO_SAMPLING if( isOs64Bit ) flags |= EVENT_TRACE_FLAG_PROFILE; +#endif s_prop->EnableFlags = flags; s_prop->LogFileMode = EVENT_TRACE_REAL_TIME_MODE; s_prop->Wnode.BufferSize = psz; diff --git a/manual/tracy.tex b/manual/tracy.tex index daa0b262..fd4d8cce 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -1788,6 +1788,8 @@ This feature requires privilege elevation, as described in chapter~\ref{contexts On Windows sampling is performed at 8 kHz frequency (which is the maximum possible value), and on Linux and Android it is performed at 10 kHz. +Call stack sampling may be disabled by using the \texttt{TRACY\_NO\_SAMPLING} define. + \subsubsection{Executable code retrieval} \label{executableretrieval}