Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ProfileEnter / ProfileLeave #88134

Merged
merged 3 commits into from
Jul 28, 2023
Merged
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
19 changes: 17 additions & 2 deletions src/coreclr/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10754,10 +10754,23 @@ void __stdcall ProfilerUnmanagedToManagedTransitionMD(MethodDesc *pMD,
// These do a lot of work for us, setting up Frames, gathering arg info and resolving generics.
//*******************************************************************************************

HCIMPL2(EXTERN_C void, ProfileEnter, UINT_PTR clientData, void * platformSpecificHandle)
HCIMPL2_RAW(EXTERN_C void, ProfileEnter, UINT_PTR clientData, void * platformSpecificHandle)
GCX_COOP_THREAD_EXISTS(GET_THREAD());
HCIMPL_PROLOG(ProfileEnter)
{
FCALL_CONTRACT;

if (GetThreadNULLOk() == NULL)
{
Thread *pThread = SetupThreadNoThrow();
if (pThread == NULL)
{
return;
}
}

GCX_COOP();

#ifdef PROFILING_SUPPORTED

#ifdef PROF_TEST_ONLY_FORCE_ELT
Expand Down Expand Up @@ -10924,7 +10937,9 @@ HCIMPL2(EXTERN_C void, ProfileEnter, UINT_PTR clientData, void * platformSpecifi
}
HCIMPLEND

HCIMPL2(EXTERN_C void, ProfileLeave, UINT_PTR clientData, void * platformSpecificHandle)
HCIMPL2_RAW(EXTERN_C void, ProfileLeave, UINT_PTR clientData, void * platformSpecificHandle)
jkotas marked this conversation as resolved.
Show resolved Hide resolved
GCX_COOP();
HCIMPL_PROLOG(ProfileLeave)
{
FCALL_CONTRACT;

Expand Down