diff options
-rw-r--r-- | src/vm/proftoeeinterfaceimpl.cpp | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/src/vm/proftoeeinterfaceimpl.cpp b/src/vm/proftoeeinterfaceimpl.cpp index b053f176e7..03362f9299 100644 --- a/src/vm/proftoeeinterfaceimpl.cpp +++ b/src/vm/proftoeeinterfaceimpl.cpp @@ -10235,15 +10235,11 @@ HCIMPL2(EXTERN_C void, ProfileEnter, UINT_PTR clientData, void * platformSpecifi #ifdef PROFILING_SUPPORTED - // We might have already torn down the profiler, if so we need to abort. - if (g_profControlBlock.curProfStatus.Get() != kProfStatusActive #ifdef PROF_TEST_ONLY_FORCE_ELT - // If this test-only flag is set, it's possible we might not have a profiler - // attached, or might not have any of the hooks set. See - // code:ProfControlBlock#TestOnlyELT - || g_profControlBlock.fTestOnlyForceEnterLeave -#endif // PROF_TEST_ONLY_FORCE_ELT - ) + // If this test-only flag is set, it's possible we might not have a profiler + // attached, or might not have any of the hooks set. See + // code:ProfControlBlock#TestOnlyELT + if (g_profControlBlock.fTestOnlyForceEnterLeave) { if ((g_profControlBlock.pProfInterface.Load() == NULL) || ( @@ -10257,6 +10253,7 @@ HCIMPL2(EXTERN_C void, ProfileEnter, UINT_PTR clientData, void * platformSpecifi return; } } +#endif // PROF_TEST_ONLY_FORCE_ELT // ELT3 Fast-Path hooks should be NULL when ELT intermediary is used. _ASSERTE(g_profControlBlock.pProfInterface->GetEnter3Hook() == NULL); @@ -10410,15 +10407,11 @@ HCIMPL2(EXTERN_C void, ProfileLeave, UINT_PTR clientData, void * platformSpecifi #ifdef PROFILING_SUPPORTED - // We might have already torn down the profiler, if so we need to abort. - if (g_profControlBlock.curProfStatus.Get() != kProfStatusActive #ifdef PROF_TEST_ONLY_FORCE_ELT - // If this test-only flag is set, it's possible we might not have a profiler - // attached, or might not have any of the hooks set. See - // code:ProfControlBlock#TestOnlyELT - || g_profControlBlock.fTestOnlyForceEnterLeave -#endif // PROF_TEST_ONLY_FORCE_ELT - ) + // If this test-only flag is set, it's possible we might not have a profiler + // attached, or might not have any of the hooks set. See + // code:ProfControlBlock#TestOnlyELT + if (g_profControlBlock.fTestOnlyForceEnterLeave) { if ((g_profControlBlock.pProfInterface.Load() == NULL) || ( @@ -10432,6 +10425,7 @@ HCIMPL2(EXTERN_C void, ProfileLeave, UINT_PTR clientData, void * platformSpecifi return; } } +#endif // PROF_TEST_ONLY_FORCE_ELT // ELT3 Fast-Path hooks should be NULL when ELT intermediary is used. _ASSERTE(g_profControlBlock.pProfInterface->GetLeave3Hook() == NULL); @@ -10545,15 +10539,11 @@ HCIMPL2(EXTERN_C void, ProfileTailcall, UINT_PTR clientData, void * platformSpec #ifdef PROFILING_SUPPORTED - // We might have already torn down the profiler, if so we need to abort. - if (g_profControlBlock.curProfStatus.Get() != kProfStatusActive #ifdef PROF_TEST_ONLY_FORCE_ELT - // If this test-only flag is set, it's possible we might not have a profiler - // attached, or might not have any of the hooks set. See - // code:ProfControlBlock#TestOnlyELT - || g_profControlBlock.fTestOnlyForceEnterLeave -#endif // PROF_TEST_ONLY_FORCE_ELT - ) + // If this test-only flag is set, it's possible we might not have a profiler + // attached, or might not have any of the hooks set. See + // code:ProfControlBlock#TestOnlyELT + if (g_profControlBlock.fTestOnlyForceEnterLeave) { if ((g_profControlBlock.pProfInterface.Load() == NULL) || ( @@ -10567,6 +10557,7 @@ HCIMPL2(EXTERN_C void, ProfileTailcall, UINT_PTR clientData, void * platformSpec return; } } +#endif // PROF_TEST_ONLY_FORCE_ELT // ELT3 fast-path hooks should be NULL when ELT intermediary is used. _ASSERTE(g_profControlBlock.pProfInterface->GetTailcall3Hook() == NULL); |