Skip to content

Commit 561b808

Browse files
committed
Enable QJFL and OSR by default for x64 and arm64
Change these default values when the jit targets x64 or arm64: * COMPlus_TC_QuickJitForLoops=1 * COMPlus_TC_OnStackReplacement=1 The upshot is that on x64/arm64 more methods will be jitted at Tier0, and we will rely on OSR to get out of long-running Tier0 methods. Other architectures continue to use the old behavior for now, as OSR is not yet supported for x86 or arm.
1 parent 4bd27a6 commit 561b808

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/coreclr/inc/clrconfigvalues.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,11 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_GainExponent,
585585
#endif // _DEBUG
586586
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TieredCompilation, W("TieredCompilation"), 1, "Enables tiered compilation")
587587
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TC_QuickJit, W("TC_QuickJit"), 1, "For methods that would be jitted, enable using quick JIT when appropriate.")
588+
#if defined(TARGET_AMD64) || defined(TARGET_ARM64)
589+
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TC_QuickJitForLoops, W("TC_QuickJitForLoops"), 1, "When quick JIT is enabled, quick JIT may also be used for methods that contain loops.")
590+
#else // !(defined(TARGET_AMD64) || defined(TARGET_ARM64))
588591
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TC_QuickJitForLoops, W("TC_QuickJitForLoops"), 0, "When quick JIT is enabled, quick JIT may also be used for methods that contain loops.")
592+
#endif // defined(TARGET_AMD64) || defined(TARGET_ARM64)
589593
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TC_AggressiveTiering, W("TC_AggressiveTiering"), 0, "Transition through tiers aggressively.")
590594
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_BackgroundWorkerTimeoutMs, W("TC_BackgroundWorkerTimeoutMs"), TC_BackgroundWorkerTimeoutMs, "How long in milliseconds the background worker thread may remain idle before exiting.")
591595
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_CallCountThreshold, W("TC_CallCountThreshold"), TC_CallCountThreshold, "Number of times a method must be called in tier 0 after which it is promoted to the next tier.")

src/coreclr/jit/jitconfigvalues.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,12 @@ CONFIG_STRING(JitGuardedDevirtualizationRange, W("JitGuardedDevirtualizationRang
461461
CONFIG_INTEGER(JitRandomGuardedDevirtualization, W("JitRandomGuardedDevirtualization"), 0)
462462
#endif // DEBUG
463463

464-
// Enable insertion of patchpoints into Tier0 methods with loops.
464+
// Enable insertion of patchpoints into Tier0 methods, switching to optimized where needed.
465+
#if defined(TARGET_AMD64) || defined(TARGET_ARM64)
466+
CONFIG_INTEGER(TC_OnStackReplacement, W("TC_OnStackReplacement"), 1)
467+
#else
465468
CONFIG_INTEGER(TC_OnStackReplacement, W("TC_OnStackReplacement"), 0)
469+
#endif // defined(TARGET_AMD64) || defined(TARGET_ARM64)
466470
// Initial patchpoint counter value used by jitted code
467471
CONFIG_INTEGER(TC_OnStackReplacement_InitialCounter, W("TC_OnStackReplacement_InitialCounter"), 1000)
468472
// Enable partial compilation for Tier0 methods

0 commit comments

Comments
 (0)