Removing 'EXPERIMENTAL' from tiered compilation env var (#17283)
authorNoah Falk <noahfalk@users.noreply.github.com>
Wed, 28 Mar 2018 20:56:24 +0000 (13:56 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Mar 2018 20:56:24 +0000 (13:56 -0700)
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.

13 files changed:
dependencies.props
src/inc/clrconfigvalues.h
src/vm/eeconfig.cpp
src/vm/tieredcompilation.cpp
tests/runtest.cmd
tests/runtest.sh
tests/scripts/run-xunit-perf.py
tests/src/CLRTest.Execute.Bash.targets
tests/src/CLRTest.Execute.Batch.targets
tests/src/baseservices/exceptions/stacktrace/Tier1StackTrace.csproj
tests/src/performance/Scenario/JitBench/Runner/BenchmarkConfiguration.cs
tests/src/performance/Scenario/JitBench/Runner/Program.cs
tests/src/reflection/Tier1Collectible/Tier1Collectible.csproj

index 54fc6d3237f918abc0fcf13a8284ede54cb36b03..ae298d67938ea3cd2a2195c4d82c3e5572627ee6 100644 (file)
@@ -45,7 +45,7 @@
     <!-- Scenario tests install this version of Microsoft.NetCore.App, then patch coreclr binaries via xcopy. At the moment it is
          updated manually whenever breaking changes require it to move forward, but it would be nice if we could update it automatically
          as we do with many of the package versions above -->
-    <BaselineMicrosoftNetCoreAppPackageVersion>2.1.0-preview3-26319-04</BaselineMicrosoftNetCoreAppPackageVersion>
+    <BaselineMicrosoftNetCoreAppPackageVersion>2.1.0-preview3-26327-01</BaselineMicrosoftNetCoreAppPackageVersion>
   </PropertyGroup>
 
   <!-- Package versions used as toolsets -->
index 98290cac6d47f6090ba08569d0a13eebf91a3398..2e66f122441304113e06b12dec4cdc226ad589db 100644 (file)
@@ -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
index ab834632562ee0d43325376dba7396077bd8dada..a227437356537dfe67c05f0fafd70ed482862dad 100644 (file)
@@ -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)
index cd571a6b477b28d9f532222beec7b85573330196..f139ddea5c6c578e77523448c25c5eb6ca5ea101 100644 (file)
 //
 // # 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:
index 1533402104eef39c5e495a8bdc3d6b786c1c9334..072c2737f9182d11bf7ba6eb8a0d4d29a16d7f63 100644 (file)
@@ -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 ^<name^>             - Runs the tests with COMPlus_GCName=name
 echo timeout ^<n^>               - Sets the per-test timeout in milliseconds ^(default is 10 minutes = 10 * 60 * 1000 = 600000^).
 echo                             Note: some options override this ^(gcstresslevel, longgc, gcsimulator^).
index d0eea533d8be994bba8757bd7ad675f1812da265..baa57e43b1291629a676608ce4c9148148dd3246 100755 (executable)
@@ -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 <ILlink>                  : 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
index 6e0a0bade3636a9f25bbaf609e613d52bd74fca3..3c1cb89dca37793f3a32aa7bfc231604355e813e 100755 (executable)
@@ -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'
index 73f70313b0c2bef0c83b3609f719ca0542e6fd1e..53b632b12e8360171cade093e888abbe64d260e5 100644 (file)
@@ -83,9 +83,9 @@ fi
       ]]></BashCLRTestEnvironmentCompatibilityCheck>
       <BashCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true'"><![CDATA[
 $(BashCLRTestEnvironmentCompatibilityCheck)
-if [[ ( ! -z "$COMPlus_JitStress" ) || ( ! -z "$COMPlus_JitStressRegs" ) || ( ! -z "$COMPlus_JITMinOpts" ) || ( ! -z "$COMPlus_TailcallStress" ) || ( ! -z "$COMPlus_EXPERIMENTAL_TieredCompilation" ) ]]
+if [[ ( ! -z "$COMPlus_JitStress" ) || ( ! -z "$COMPlus_JitStressRegs" ) || ( ! -z "$COMPlus_JITMinOpts" ) || ( ! -z "$COMPlus_TailcallStress" ) || ( ! -z "$COMPlus_EXPERIMENTAL_TieredCompilation" ) || ( ! -z "$COMPlus_TieredCompilation" ) ]]
 then
-  echo "SKIPPING EXECUTION BECAUSE ONE OR MORE OF (COMPlus_JitStress, COMPlus_JitStressRegs, COMPlus_JITMinOpts, COMPlus_TailcallStress, COMPlus_EXPERIMENTAL_TieredCompilation) IS SET"
+  echo "SKIPPING EXECUTION BECAUSE ONE OR MORE OF (COMPlus_JitStress, COMPlus_JitStressRegs, COMPlus_JITMinOpts, COMPlus_TailcallStress, COMPlus_EXPERIMENTAL_TieredCompilation, COMPlus_TieredCompilation) IS SET"
   exit $(GCBashScriptExitCode)
 fi
       ]]></BashCLRTestEnvironmentCompatibilityCheck>
index 7abf16a731f803399a714ba2fc6191fb4e9e9c5e..b02c396cd4fd83a8de51f9d7a1414fa6714e0289 100644 (file)
@@ -78,8 +78,8 @@ IF NOT "%COMPlus_GCStress%"=="" (
       ]]></BatchCLRTestEnvironmentCompatibilityCheck>
       <BatchCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true'"><![CDATA[
 $(BatchCLRTestEnvironmentCompatibilityCheck)
-IF "%COMPlus_JitStress%"=="" IF "%COMPlus_JitStressRegs%"=="" IF "%COMPlus_JITMinOpts%"=="" IF "%COMPlus_TailcallStress%"=="" IF "%COMPlus_EXPERIMENTAL_TieredCompilation%"=="" goto :Compatible1
-  ECHO SKIPPING EXECUTION BECAUSE ONE OR MORE OF (COMPlus_JitStress, COMPlus_JitStressRegs, COMPlus_JITMinOpts, COMPlus_TailcallStress, COMPlus_EXPERIMENTAL_TieredCompilation) IS SET
+IF "%COMPlus_JitStress%"=="" IF "%COMPlus_JitStressRegs%"=="" IF "%COMPlus_JITMinOpts%"=="" IF "%COMPlus_TailcallStress%"=="" IF "%COMPlus_EXPERIMENTAL_TieredCompilation%"=="" IF "%COMPlus_TieredCompilation%"=="" goto :Compatible1
+  ECHO SKIPPING EXECUTION BECAUSE ONE OR MORE OF (COMPlus_JitStress, COMPlus_JitStressRegs, COMPlus_JITMinOpts, COMPlus_TailcallStress, COMPlus_EXPERIMENTAL_TieredCompilation, COMPlus_TieredCompilation) IS SET
   popd
   Exit /b 0
 :Compatible1
index c426338ea93dc6d2ca7dd35da650f7bff0b753f3..c0a2ca94b081f181e1b83ae686c1de970d05bc8b 100644 (file)
   <PropertyGroup>
     <CLRTestBatchPreCommands><![CDATA[
 $(CLRTestBatchPreCommands)
-set COMPlus_EXPERIMENTAL_TieredCompilation=1
+set COMPlus_TieredCompilation=1
 ]]></CLRTestBatchPreCommands>
     <BashCLRTestPreCommands><![CDATA[
 $(BashCLRTestPreCommands)
-export COMPlus_EXPERIMENTAL_TieredCompilation=1
+export COMPlus_TieredCompilation=1
 ]]></BashCLRTestPreCommands>
   </PropertyGroup>
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
index 42aa2e26985d6c70157619b7570b7d20cfaedfa9..a72963cec239c0bc34196812371c987d83dfa04c 100644 (file)
@@ -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()
index 9b81c9411830ae1dc9423a50dc28d6fa11855e27..fc8615dbf89a3b024495fc830f86e931fe5f5044 100644 (file)
@@ -163,7 +163,7 @@ namespace JitBench
 
         static IEnumerable<BenchmarkConfiguration> 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");
index a7772f64c2b02fbcd04fb01e19d4254ee47c2aee..926be4a475ac0393206b16bafb395ea0fe5c784c 100644 (file)
   <PropertyGroup>
     <CLRTestBatchPreCommands><![CDATA[
 $(CLRTestBatchPreCommands)
-set COMPlus_EXPERIMENTAL_TieredCompilation=1
+set COMPlus_TieredCompilation=1
 ]]></CLRTestBatchPreCommands>
     <BashCLRTestPreCommands><![CDATA[
 $(BashCLRTestPreCommands)
-export COMPlus_EXPERIMENTAL_TieredCompilation=1
+export COMPlus_TieredCompilation=1
 ]]></BashCLRTestPreCommands>
   </PropertyGroup>
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />