diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp index 2202724b..bef85431 100644 --- a/public/client/TracyCallstack.cpp +++ b/public/client/TracyCallstack.cpp @@ -161,16 +161,16 @@ void InitCallstack() // and process module symbol loading at startup time - they will be loaded on demand later // Sometimes this process can take a very long time and prevent resolving callstack frames // symbols during that time. - const char* noInitLoadEnv = GetEnvVar("TRACY_NO_DBHELP_INIT_LOAD"); - const bool initTimeLoadModules = !(noInitLoadEnv && noInitLoadEnv[0] == '1'); - if (!initTimeLoadModules) + const char* noInitLoadEnv = GetEnvVar( "TRACY_NO_DBHELP_INIT_LOAD" ); + const bool initTimeModuleLoad = !( noInitLoadEnv && noInitLoadEnv[0] == '1' ); + if ( !initTimeModuleLoad ) { - printf("TRACY: skipping init dbhelper module load\n"); + TracyDebug("TRACY: skipping init time dbghelper module load\n"); } DWORD needed; LPVOID dev[4096]; - if( initTimeLoadModules && (EnumDeviceDrivers( dev, sizeof(dev), &needed ) != 0) ) + if( initTimeModuleLoad && EnumDeviceDrivers( dev, sizeof(dev), &needed ) != 0 ) { char windir[MAX_PATH]; if( !GetWindowsDirectoryA( windir, sizeof( windir ) ) ) memcpy( windir, "c:\\windows", 11 ); @@ -225,7 +225,7 @@ void InitCallstack() HANDLE proc = GetCurrentProcess(); HMODULE mod[1024]; - if( initTimeLoadModules && (EnumProcessModules( proc, mod, sizeof( mod ), &needed ) != 0) ) + if( initTimeModuleLoad && EnumProcessModules( proc, mod, sizeof( mod ), &needed ) != 0 ) { const auto sz = needed / sizeof( HMODULE ); for( size_t i=0; i #elif TRACY_HAS_CALLSTACK >= 3 - #ifdef TRACE_CLIENT_LIBUNWIND_BACKTRACE - // libunwind is in general significantly faster than execinfo based backtraces - #define UNW_LOCAL_ONLY - # include - #else - # include - #endif - +# ifdef TRACE_CLIENT_LIBUNWIND_BACKTRACE + // libunwind is, in general, significantly faster than execinfo based backtraces +# define UNW_LOCAL_ONLY +# include +# else +# include +# endif #endif #ifndef TRACY_HAS_CALLSTACK diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index 37d0d500..d5ad959f 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -1439,14 +1439,13 @@ Profiler::Profiler() void Profiler::SpawnWorkerThreads() { #ifdef TRACY_HAS_SYSTEM_TRACING - // use TRACY_NO_SYS_TRACE=1 to force disabling sys tracing - // (even if available in the underlying system) + // 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) + if( disableSystrace ) { - printf("TRACY: systrace was disabled by 'TRACY_NO_SYS_TRACE=1'\n"); + TracyDebug("TRACY: Sys Trace was disabled by 'TRACY_NO_SYS_TRACE=1'\n"); } else if( SysTraceStart( m_samplingPeriod ) ) {