summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mason <davmason@microsoft.com>2019-09-18 13:10:59 -0700
committerAlexander Soldatov/AI Compiler Lab /SRR/Staff Engineer/삼성전자 <soldatov.a@samsung.com>2019-10-07 11:59:33 +0300
commitde564f4307b36f21f30d428d53ac71b5d96d4710 (patch)
treebadc42b3925028b57f787ea3dd2ebe5ec49f5508
parentdcfac98e5f9efc8d05e4560f8933785a9053c306 (diff)
downloadcoreclr-de564f4307b36f21f30d428d53ac71b5d96d4710.tar.gz
coreclr-de564f4307b36f21f30d428d53ac71b5d96d4710.tar.bz2
coreclr-de564f4307b36f21f30d428d53ac71b5d96d4710.zip
Revert "bail if profiler is terminated"
This reverts commit a5339ba00e94b8cd0c85b67fa66944eabc4ec7ad.
-rw-r--r--src/vm/proftoeeinterfaceimpl.cpp39
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);