mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Add "TRACY_NO_SYS_TRACE" env var to allow force disabling system trace even if the underlying system supports it
This commit is contained in:
parent
790d28911d
commit
95cb3e1f5a
@ -1439,7 +1439,16 @@ Profiler::Profiler()
|
||||
void Profiler::SpawnWorkerThreads()
|
||||
{
|
||||
#ifdef TRACY_HAS_SYSTEM_TRACING
|
||||
if( SysTraceStart( m_samplingPeriod ) )
|
||||
// use TRACY_NO_SYS_TRACE=1 to force disabling sys tracing
|
||||
// (even if available in the underlying system)
|
||||
// as it can have significant impact on the size of the traces
|
||||
const char* noSysTrace = GetEnvVar( "TRACY_NO_SYS_TRACE" );
|
||||
const bool disableSystrace = (noSysTrace && noSysTrace[0] == '1');
|
||||
if(disableSystrace)
|
||||
{
|
||||
printf("TRACY: systrace was disabled by 'TRACY_NO_SYS_TRACE=1'\n");
|
||||
}
|
||||
else if( SysTraceStart( m_samplingPeriod ) )
|
||||
{
|
||||
s_sysTraceThread = (Thread*)tracy_malloc( sizeof( Thread ) );
|
||||
new(s_sysTraceThread) Thread( SysTraceWorker, nullptr );
|
||||
|
Loading…
x
Reference in New Issue
Block a user