Allow disabling call stack sampling.

Only on Windows for now.
This commit is contained in:
Bartosz Taudul 2020-11-05 23:59:52 +01:00
parent 4caaa325c2
commit e920b5cf64
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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}