From: Noah Falk Date: Wed, 28 Mar 2018 20:56:24 +0000 (-0700) Subject: Removing 'EXPERIMENTAL' from tiered compilation env var (#17283) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c32fda3feb190f60934ffc0de7a328e0506e367;p=platform%2Fupstream%2Fcoreclr.git Removing 'EXPERIMENTAL' from tiered compilation env var (#17283) Things have progressed far enough that its time to use a friendlier name. The feature still still has performance aspects that need to be investigated and improved, but I don't want to scare people off simply because it isn't as fast as it could be. This also updates to use a newer CoreFX version for JitBench since that appeared to be broken, and updated some comments and usage of the tieredcompilation variable. --- diff --git a/dependencies.props b/dependencies.props index 54fc6d3237..ae298d6793 100644 --- a/dependencies.props +++ b/dependencies.props @@ -45,7 +45,7 @@ - 2.1.0-preview3-26319-04 + 2.1.0-preview3-26327-01 diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h index 98290cac6d..2e66f12244 100644 --- a/src/inc/clrconfigvalues.h +++ b/src/inc/clrconfigvalues.h @@ -650,7 +650,8 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_GainExponent, /// Tiered Compilation /// #ifdef FEATURE_TIERED_COMPILATION -RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredCompilation, W("EXPERIMENTAL_TieredCompilation"), 0, "Enables tiered compilation") +RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TieredCompilation, W("TieredCompilation"), 0, "Enables tiered compilation") +RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_LEGACY_TieredCompilation, W("EXPERIMENTAL_TieredCompilation"), 0, "Deprecated - Use COMPLUS_TieredCompilation") RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredCompilation_Tier1CallCountThreshold, W("TieredCompilation_Tier1CallCountThreshold"), 30, "Number of times a method must be called after which it is promoted to tier 1.") RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredCompilation_Tier1CallCountingDelayMs, W("TieredCompilation_Tier1CallCountingDelayMs"), 100, "Delay in milliseconds since process startup or the last tier 0 JIT before call counting begins for tier 1 promotion.") #endif diff --git a/src/vm/eeconfig.cpp b/src/vm/eeconfig.cpp index ab83463256..a227437356 100644 --- a/src/vm/eeconfig.cpp +++ b/src/vm/eeconfig.cpp @@ -1240,7 +1240,10 @@ HRESULT EEConfig::sync() dwSleepOnExit = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_SleepOnExit); #if defined(FEATURE_TIERED_COMPILATION) - fTieredCompilation = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_TieredCompilation) != 0; + fTieredCompilation = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_TieredCompilation) != 0 || + //this older name is deprecated, but still accepted for a time. Preserving it is a very small overhead not to needlessly break things. + CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_LEGACY_TieredCompilation) != 0; + tieredCompilation_tier1CallCountThreshold = CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_TieredCompilation_Tier1CallCountThreshold); if (tieredCompilation_tier1CallCountThreshold < 1) diff --git a/src/vm/tieredcompilation.cpp b/src/vm/tieredcompilation.cpp index cd571a6b47..f139ddea5c 100644 --- a/src/vm/tieredcompilation.cpp +++ b/src/vm/tieredcompilation.cpp @@ -22,19 +22,11 @@ // // # Current feature state // -// This feature is incomplete and currently experimental. To enable it -// you need to set COMPLUS_EXPERIMENTAL_TieredCompilation = 1. When the environment -// variable is unset the runtime should work as normal, but when it is there are a few -// known issues -// ETW - Native to IL maps aren't correctly emitted (probably tier1 wrong, tier0 right) -// Profiler - Still missing APIs that allow profilers to correctly get native to IL -// maps for all code bodies. -// -// Diagnostic tools have minimal testing that we are aware of and its possible they -// made additional assumptions about runtime implementation that have been invalidated -// by this feature. VS debugging does appear to work at a basic level at least. -// -// I aim to keep this comment updated as things change. +// This feature is a work in progress. It should be functionally correct for a +// good range of scenarios, but performance varies by scenario. To enable it +// you need to set COMPLUS_TieredCompilation = 1. This feature has been +// tested with all of our runtime and CoreFX functional tests, as well as +// diagnostics tests and various partner testing in Visual Studio. // // // # Important entrypoints in this code: diff --git a/tests/runtest.cmd b/tests/runtest.cmd index 1533402104..072c2737f9 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -80,7 +80,7 @@ if /i "%1" == "GenerateLayoutOnly" (set __GenerateLayoutOnly=1&shift&goto Arg if /i "%1" == "PerfTests" (set __PerfTests=true&shift&goto Arg_Loop) if /i "%1" == "runcrossgentests" (set RunCrossGen=true&shift&goto Arg_Loop) if /i "%1" == "link" (set DoLink=true&set ILLINK=%2&shift&shift&goto Arg_Loop) -if /i "%1" == "tieredcompilation" (set COMPLUS_EXPERIMENTAL_TieredCompilation=1&shift&goto Arg_Loop) +if /i "%1" == "tieredcompilation" (set COMPLUS_TieredCompilation=1&shift&goto Arg_Loop) if /i "%1" == "gcname" (set COMPlus_GCName=%2&shift&shift&goto Arg_Loop) if /i "%1" == "timeout" (set __TestTimeout=%2&shift&shift&goto Arg_Loop) @@ -515,7 +515,7 @@ echo 2: GC on transitions to preemptive GC echo 4: GC on every allowable JITed instruction echo 8: GC on every allowable NGEN instruction echo 16: GC only on a unique stack trace -echo tieredcompilation - Run the tests with COMPlus_EXPERIMENTAL_TieredCompilation=1 +echo tieredcompilation - Run the tests with COMPlus_TieredCompilation=1 echo gcname ^ - Runs the tests with COMPlus_GCName=name echo timeout ^ - Sets the per-test timeout in milliseconds ^(default is 10 minutes = 10 * 60 * 1000 = 600000^). echo Note: some options override this ^(gcstresslevel, longgc, gcsimulator^). diff --git a/tests/runtest.sh b/tests/runtest.sh index d0eea533d8..baa57e43b1 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -59,7 +59,7 @@ function print_usage { echo ' 8: GC on every allowable NGEN instr 16: GC only on a unique stack trace' echo ' --long-gc : Runs the long GC tests' echo ' --gcsimulator : Runs the GCSimulator tests' - echo ' --tieredcompilation : Runs the tests with COMPlus_EXPERIMENTAL_TieredCompilation=1' + echo ' --tieredcompilation : Runs the tests with COMPlus_TieredCompilation=1' echo ' --link : Runs the tests after linking via ILlink' echo ' --show-time : Print execution sequence and running time for each test' echo ' --no-lf-conversion : Do not execute LF conversion before running test script' @@ -1127,7 +1127,7 @@ do export DoLink=true ;; --tieredcompilation) - export COMPlus_EXPERIMENTAL_TieredCompilation=1 + export COMPlus_TieredCompilation=1 ;; --jitdisasm) jitdisasm=1 diff --git a/tests/scripts/run-xunit-perf.py b/tests/scripts/run-xunit-perf.py index 6e0a0bade3..3c1cb89dca 100755 --- a/tests/scripts/run-xunit-perf.py +++ b/tests/scripts/run-xunit-perf.py @@ -458,7 +458,7 @@ def main(args): if optLevel == 'min_opts': myEnv['COMPlus_JITMinOpts'] = '1' elif optLevel == 'tiered': - myEnv['COMPLUS_EXPERIMENTAL_TieredCompilation'] = '1' + myEnv['COMPLUS_TieredCompilation'] = '1' if not 'XUNIT_PERFORMANCE_MAX_ITERATION' in myEnv: myEnv['XUNIT_PERFORMANCE_MAX_ITERATION'] = '21' diff --git a/tests/src/CLRTest.Execute.Bash.targets b/tests/src/CLRTest.Execute.Bash.targets index 73f70313b0..53b632b12e 100644 --- a/tests/src/CLRTest.Execute.Bash.targets +++ b/tests/src/CLRTest.Execute.Bash.targets @@ -83,9 +83,9 @@ fi ]]> diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets index 7abf16a731..b02c396cd4 100644 --- a/tests/src/CLRTest.Execute.Batch.targets +++ b/tests/src/CLRTest.Execute.Batch.targets @@ -78,8 +78,8 @@ IF NOT "%COMPlus_GCStress%"=="" ( ]]> diff --git a/tests/src/performance/Scenario/JitBench/Runner/BenchmarkConfiguration.cs b/tests/src/performance/Scenario/JitBench/Runner/BenchmarkConfiguration.cs index 42aa2e2698..a72963cec2 100644 --- a/tests/src/performance/Scenario/JitBench/Runner/BenchmarkConfiguration.cs +++ b/tests/src/performance/Scenario/JitBench/Runner/BenchmarkConfiguration.cs @@ -17,7 +17,7 @@ namespace JitBench public BenchmarkConfiguration WithTiering() { - return WithModifier("Tiering", "COMPLUS_EXPERIMENTAL_TieredCompilation", "1"); + return WithModifier("Tiering", "COMPLUS_TieredCompilation", "1"); } public BenchmarkConfiguration WithMinOpts() diff --git a/tests/src/performance/Scenario/JitBench/Runner/Program.cs b/tests/src/performance/Scenario/JitBench/Runner/Program.cs index 9b81c94118..fc8615dbf8 100644 --- a/tests/src/performance/Scenario/JitBench/Runner/Program.cs +++ b/tests/src/performance/Scenario/JitBench/Runner/Program.cs @@ -163,7 +163,7 @@ namespace JitBench static IEnumerable GetBenchmarkConfigurations(CommandLineOptions options) { - string tieredEnv = Environment.GetEnvironmentVariable("COMPLUS_EXPERIMENTAL_TieredCompilation"); + string tieredEnv = Environment.GetEnvironmentVariable("COMPLUS_TieredCompilation"); string minoptsEnv = Environment.GetEnvironmentVariable("COMPLUS_JitMinopts"); string r2rEnv = Environment.GetEnvironmentVariable("COMPLUS_ReadyToRun"); string ngenEnv = Environment.GetEnvironmentVariable("COMPLUS_ZapDisable"); diff --git a/tests/src/reflection/Tier1Collectible/Tier1Collectible.csproj b/tests/src/reflection/Tier1Collectible/Tier1Collectible.csproj index a7772f64c2..926be4a475 100644 --- a/tests/src/reflection/Tier1Collectible/Tier1Collectible.csproj +++ b/tests/src/reflection/Tier1Collectible/Tier1Collectible.csproj @@ -21,11 +21,11 @@