diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index 135b867a..64ce3540 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -368,7 +368,10 @@ bool SysTraceStart( int64_t& samplingPeriod ) const auto psz = sizeof( EVENT_TRACE_PROPERTIES ) + sizeof( KERNEL_LOGGER_NAME ); s_prop = (EVENT_TRACE_PROPERTIES*)tracy_malloc( psz ); memset( s_prop, 0, sizeof( EVENT_TRACE_PROPERTIES ) ); - ULONG flags = EVENT_TRACE_FLAG_CSWITCH | EVENT_TRACE_FLAG_DISPATCHER | EVENT_TRACE_FLAG_THREAD; + ULONG flags = 0; +#ifndef TRACY_NO_CONTEXT_SWITCH + flags = EVENT_TRACE_FLAG_CSWITCH | EVENT_TRACE_FLAG_DISPATCHER | EVENT_TRACE_FLAG_THREAD; +#endif if( isOs64Bit ) flags |= EVENT_TRACE_FLAG_PROFILE; s_prop->EnableFlags = flags; s_prop->LogFileMode = EVENT_TRACE_REAL_TIME_MODE; diff --git a/manual/tracy.tex b/manual/tracy.tex index c804ac3a..daa0b262 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -1743,7 +1743,7 @@ As a corollary, it is often not enough to know how long it took to execute a zon To solve this problem, Tracy collects context switch\footnote{A context switch happens when any given CPU core stops executing one thread and starts running another one.} information. This data can be then used to see when a zone was in the executing state and where it was waiting to be resumed. -Context switch data capture may be disabled by adding the \texttt{TRACY\_NO\_SYSTEM\_TRACING} define to the client. +Context switch data capture may be disabled by adding the \texttt{TRACY\_NO\_CONTEXT\_SWITCH} define to the client. Alternatively, the \texttt{TRACY\_NO\_SYSTEM\_TRACING} define may be used to disable all tracing needing privilege escalation. \begin{bclogo}[ noborder=true,