diff --git a/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp b/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp index 111cbe01aee10..2e043121afa06 100644 --- a/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp +++ b/src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp @@ -307,8 +307,6 @@ HRESULT STDMETHODCALLTYPE SlowPathELTProfiler::LeaveCallback(FunctionIDOrClientI HRESULT STDMETHODCALLTYPE SlowPathELTProfiler::TailcallCallback(FunctionIDOrClientID functionIdOrClientID, COR_PRF_ELT_INFO eltInfo) { - SHUTDOWNGUARD(); - COR_PRF_FRAME_INFO frameInfo; HRESULT hr = pCorProfilerInfo->GetFunctionTailcall3Info(functionIdOrClientID.functionID, eltInfo, &frameInfo); if (FAILED(hr)) diff --git a/src/tests/profiler/native/profiler.h b/src/tests/profiler/native/profiler.h index 353de1392a920..9231c576cd353 100644 --- a/src/tests/profiler/native/profiler.h +++ b/src/tests/profiler/native/profiler.h @@ -67,25 +67,19 @@ class ShutdownGuard // Managed code can keep running after Shutdown() is called, and things like // ELT hooks will continue to be called. We would AV if we tried to call // in to freed resources. -#define SHUTDOWNGUARD() \ - do \ - { \ - ShutdownGuard(); \ - if (ShutdownGuard::HasShutdownStarted()) \ - { \ - return S_OK; \ - } \ - } while(0) - -#define SHUTDOWNGUARD_RETVOID() \ - do \ - { \ - ShutdownGuard(); \ - if (ShutdownGuard::HasShutdownStarted()) \ - { \ - return; \ - } \ - } while(0) +#define SHUTDOWNGUARD() \ + ShutdownGuard(); \ + if (ShutdownGuard::HasShutdownStarted()) \ + { \ + return S_OK; \ + } + +#define SHUTDOWNGUARD_RETVOID() \ + ShutdownGuard(); \ + if (ShutdownGuard::HasShutdownStarted()) \ + { \ + return; \ + } class Profiler : public ICorProfilerCallback10 {