diff options
author | Aditya Mandaleeka <adityam@microsoft.com> | 2016-03-11 18:39:27 -0800 |
---|---|---|
committer | Aditya Mandaleeka <adityam@microsoft.com> | 2016-03-25 17:54:53 -0700 |
commit | 1aa1b8ba64365f8b93a505d4f6165c6eaad84a7a (patch) | |
tree | 8959cf6022f00a12084aad1c4139d3ba3a5c9501 /src/vm/eeconfig.cpp | |
parent | 6cbd27ede090e1731b96d4d2b18813adb67e1487 (diff) | |
download | coreclr-1aa1b8ba64365f8b93a505d4f6165c6eaad84a7a.tar.gz coreclr-1aa1b8ba64365f8b93a505d4f6165c6eaad84a7a.tar.bz2 coreclr-1aa1b8ba64365f8b93a505d4f6165c6eaad84a7a.zip |
Add new configuration mechanism for CoreCLR.
Diffstat (limited to 'src/vm/eeconfig.cpp')
-rw-r--r-- | src/vm/eeconfig.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/vm/eeconfig.cpp b/src/vm/eeconfig.cpp index 973a4f4235..ddf2048f33 100644 --- a/src/vm/eeconfig.cpp +++ b/src/vm/eeconfig.cpp @@ -33,6 +33,9 @@ #ifdef FEATURE_WIN_DB_APPCOMPAT #include "QuirksApi.h" #endif +#ifdef FEATURE_CORECLR +#include "configuration.h" +#endif using namespace clr; @@ -789,10 +792,18 @@ HRESULT EEConfig::sync() g_fEnableARM = TRUE; } - int forceGCconcurrent = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_gcConcurrent); - if ((forceGCconcurrent > 0) || (forceGCconcurrent == -1 && g_IGCconcurrent)) + bool gcConcurrentWasForced = false; +#ifdef FEATURE_CORECLR + gcConcurrentWasForced = Configuration::GetKnobBooleanValue(W("System.GC.Concurrent"), CLRConfig::UNSUPPORTED_gcConcurrent); + if (gcConcurrentWasForced) iGCconcurrent = TRUE; - +#else + int gcConcurrentConfigVal = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_gcConcurrent); + gcConcurrentWasForced = (gcConcurrentConfigVal > 0); + if (gcConcurrentWasForced || (gcConcurrentConfigVal == -1 && g_IGCconcurrent)) + iGCconcurrent = TRUE; +#endif + // Disable concurrent GC during ngen for the rare case a GC gets triggered, causing problems if (IsCompilationProcess()) iGCconcurrent = FALSE; @@ -853,7 +864,7 @@ HRESULT EEConfig::sync() if (bGCStressAndHeapVerifyAllowed) { - if (forceGCconcurrent > 0) + if (gcConcurrentWasForced) { #ifdef _DEBUG iFastGCStress = 0; @@ -901,7 +912,7 @@ HRESULT EEConfig::sync() if (g_IGCHoardVM) iGCHoardVM = g_IGCHoardVM; else - iGCHoardVM = GetConfigDWORD_DontUse_(CLRConfig::UNSUPPORTED_GCRetainVM, iGCHoardVM); + iGCHoardVM = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_GCRetainVM); if (!iGCLOHCompactionMode) iGCLOHCompactionMode = GetConfigDWORD_DontUse_(CLRConfig::UNSUPPORTED_GCLOHCompact, iGCLOHCompactionMode); |