mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 17:20:48 +00:00
more explicit error check
This commit is contained in:
@@ -209,14 +209,15 @@ bool SysTraceStart( int64_t& samplingPeriod )
|
||||
return false;
|
||||
|
||||
#ifndef TRACY_NO_CONTEXT_SWITCH
|
||||
if ( etw::EnableStackWalk( session_kernel, etw::ThreadGuid, etw::CSwitch::Opcode ) )
|
||||
if ( etw::EnableStackWalk( session_kernel, etw::ThreadGuid, etw::CSwitch::Opcode ) != ERROR_SUCCESS )
|
||||
return etw::StopSession( session_kernel ), false;
|
||||
#endif
|
||||
|
||||
#ifndef TRACY_NO_SAMPLING
|
||||
if ( etw::EnableStackWalk( session_kernel, etw::PerfInfoGuid, etw::SampledProfile::Opcode ) )
|
||||
if ( etw::EnableStackWalk( session_kernel, etw::PerfInfoGuid, etw::SampledProfile::Opcode ) != ERROR_SUCCESS )
|
||||
return etw::StopSession( session_kernel ), false;
|
||||
int microseconds = GetSamplingInterval() / 10;
|
||||
if ( etw::SetCPUProfilingInterval( microseconds ) )
|
||||
if ( etw::SetCPUProfilingInterval( microseconds ) != ERROR_SUCCESS )
|
||||
return etw::StopSession( session_kernel ), false;
|
||||
samplingPeriod = GetSamplingPeriod();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user