Skip to content

Commit 03bc5a8

Browse files
kgjkotas
andauthored
[interp] Disable tiered compilation if the interpreter is enabled (#118911)
Disable Tiered Compilation if DOTNET_Interpreter or DOTNET_InterpMode are used. Co-authored-by: Jan Kotas <[email protected]>
1 parent 6265b71 commit 03bc5a8

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/coreclr/inc/clrconfigvalues.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ RETAIL_CONFIG_STRING_INFO(EXTERNAL_AltJitExcludeAssemblies, W("AltJitExcludeAsse
305305
RETAIL_CONFIG_STRING_INFO(EXTERNAL_InterpreterName, W("InterpreterName"), "Primary interpreter to use")
306306
CONFIG_STRING_INFO(INTERNAL_InterpreterPath, W("InterpreterPath"), "Full path to the interpreter to use")
307307
RETAIL_CONFIG_STRING_INFO(EXTERNAL_Interpreter, W("Interpreter"), "Enables Interpreter and selectively limits it to the specified methods.")
308+
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_InterpMode, W("InterpMode"), 0, "Enables Interpreter for a subset of all methods depending on the specified mode.")
308309
#endif // FEATURE_INTERPRETER
309310

310311
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_JitHostMaxSlabCache, W("JitHostMaxSlabCache"), 0x1000000, "Sets jit host max slab cache size, 16MB default")

src/coreclr/vm/eeconfig.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,25 @@ HRESULT EEConfig::sync()
635635

636636
#if defined(FEATURE_TIERED_COMPILATION)
637637
fTieredCompilation = Configuration::GetKnobBooleanValue(W("System.Runtime.TieredCompilation"), CLRConfig::EXTERNAL_TieredCompilation);
638+
639+
#if defined(FEATURE_INTERPRETER)
640+
if (fTieredCompilation)
641+
{
642+
// Disable tiered compilation for interpreter testing. Tiered compilation and interpreter
643+
// do not work well together currently.
644+
LPWSTR pwzInterpreterMaybe;
645+
IfFailThrow(CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_Interpreter, &pwzInterpreterMaybe));
646+
if (pwzInterpreterMaybe && pwzInterpreterMaybe[0] != 0)
647+
{
648+
fTieredCompilation = false;
649+
}
650+
else if (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_InterpMode) != 0)
651+
{
652+
fTieredCompilation = false;
653+
}
654+
}
655+
#endif
656+
638657
if (fTieredCompilation)
639658
{
640659
fTieredCompilation_QuickJit =

0 commit comments

Comments
 (0)