Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/tests/profiler/native/eltprofiler/slowpatheltprofiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ HRESULT STDMETHODCALLTYPE SlowPathELTProfiler::LeaveCallback(FunctionIDOrClientI

HRESULT STDMETHODCALLTYPE SlowPathELTProfiler::TailcallCallback(FunctionIDOrClientID functionIdOrClientID, COR_PRF_ELT_INFO eltInfo)
{
SHUTDOWNGUARD();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is superfluous since it's already protected in TailcallStub above.


COR_PRF_FRAME_INFO frameInfo;
HRESULT hr = pCorProfilerInfo->GetFunctionTailcall3Info(functionIdOrClientID.functionID, eltInfo, &frameInfo);
if (FAILED(hr))
Expand Down
32 changes: 13 additions & 19 deletions src/tests/profiler/native/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down