From f057fab26933ed34575643057420238eb9bac98d Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Fri, 16 Feb 2024 11:08:30 -0800 Subject: [PATCH 1/2] Remove more ZapDisable/ZapRequire references Follow-up to #96867 --- eng/pipelines/common/templates/runtimes/run-test-job.yml | 8 ++++---- eng/pipelines/libraries/run-test-job.yml | 8 ++++---- src/coreclr/scripts/superpmi.py | 9 ++++----- src/libraries/sendtohelixhelp.proj | 6 +++--- src/tests/Common/CLRTest.CrossGen.targets | 6 ------ .../CoreCLRTestLibrary/CoreClrConfigurationDetection.cs | 4 ++-- .../Common/XUnitWrapperGenerator/RuntimeTestModes.cs | 4 ++-- .../XUnitWrapperGenerator/XUnitWrapperGenerator.cs | 4 ++-- src/tests/Common/testenvironment.proj | 9 ++++----- src/tests/Directory.Build.props | 5 ----- .../JIT/Regression/Dev11/External/Dev11_243742/app.cs | 1 - .../readytorun/tests/genericsload/usegenericfield.csproj | 1 - 12 files changed, 25 insertions(+), 40 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index a2e13dca489deb..28a421c1055120 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -389,7 +389,7 @@ jobs: - jitstress1_tiered - jitstress2 - jitstress2_tiered - - zapdisable + - disabler2r - tailcallstress ${{ if in(parameters.testGroup, 'jitstress-random') }}: scenarios: @@ -507,9 +507,9 @@ jobs: ${{ if in(parameters.testGroup, 'gcstress-extra') }}: scenarios: - heapverify1 - - gcstress0xc_zapdisable - - gcstress0xc_zapdisable_jitstress2 - - gcstress0xc_zapdisable_heapverify1 + - gcstress0xc_disabler2r + - gcstress0xc_disabler2r_jitstress2 + - gcstress0xc_disabler2r_heapverify1 - gcstress0xc_jitstress1 - gcstress0xc_jitstress2 - gcstress0xc_tailcallstress diff --git a/eng/pipelines/libraries/run-test-job.yml b/eng/pipelines/libraries/run-test-job.yml index 5c68b4377ee143..78f2d73e49f6fe 100644 --- a/eng/pipelines/libraries/run-test-job.yml +++ b/eng/pipelines/libraries/run-test-job.yml @@ -183,7 +183,7 @@ jobs: - jitstress1_tiered - jitstress2 - jitstress2_tiered - - zapdisable + - disabler2r - tailcallstress ${{ if in(parameters.coreclrTestGroup, 'jitstress-random') }}: scenarios: @@ -220,9 +220,9 @@ jobs: ${{ if in(parameters.coreclrTestGroup, 'gcstress-extra') }}: scenarios: - heapverify1 - - gcstress0xc_zapdisable - - gcstress0xc_zapdisable_jitstress2 - - gcstress0xc_zapdisable_heapverify1 + - gcstress0xc_disabler2r + - gcstress0xc_disabler2r_jitstress2 + - gcstress0xc_disabler2r_heapverify1 - gcstress0xc_jitstress1 - gcstress0xc_jitstress2 - gcstress0xc_jitminopts_heapverify1 diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index baca765929ce4c..433f5c6c124b5d 100644 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -296,7 +296,7 @@ def add_core_root_arguments(parser, build_type_default, build_type_help): collect_parser.add_argument("-output_mch_path", help="Location to place the final MCH file. Default is a constructed file name in the current directory.") collect_parser.add_argument("--merge_mch_files", action="store_true", help="Merge multiple MCH files. Use the -mch_files flag to pass a list of MCH files to merge.") collect_parser.add_argument("-mch_files", metavar="MCH_FILE", nargs='+', help="Pass a sequence of MCH files which will be merged. Required by --merge_mch_files.") -collect_parser.add_argument("--use_zapdisable", action="store_true", help="Sets DOTNET_ZapDisable=1 and DOTNET_ReadyToRun=0 when doing collection to cause NGEN/ReadyToRun images to not be used, and thus causes JIT compilation and SuperPMI collection of these methods.") +collect_parser.add_argument("--disable_r2r", action="store_true", help="Sets DOTNET_ReadyToRun=0 when doing collection to cause ReadyToRun images to not be used, and thus causes JIT compilation and SuperPMI collection of these methods.") collect_parser.add_argument("--tiered_compilation", action="store_true", help="Sets DOTNET_TieredCompilation=1 when doing collections.") collect_parser.add_argument("--tiered_pgo", action="store_true", help="Sets DOTNET_TieredCompilation=1 and DOTNET_TieredPGO=1 when doing collections.") collect_parser.add_argument("--ci", action="store_true", help="Special collection mode for handling zero-sized files in Azure DevOps + Helix pipelines collections.") @@ -841,8 +841,7 @@ def __collect_mc_files__(self): else: dotnet_env["TieredCompilation"] = "0" - if self.coreclr_args.use_zapdisable: - dotnet_env["ZapDisable"] = "1" + if self.coreclr_args.disable_r2r: dotnet_env["ReadyToRun"] = "0" logging.debug("Starting collection.") @@ -4551,9 +4550,9 @@ def verify_base_diff_args(): "Unable to set clean.") coreclr_args.verify(args, - "use_zapdisable", + "disable_r2r", lambda unused: True, - "Unable to set use_zapdisable") + "Unable to set disable_r2r") coreclr_args.verify(args, "tiered_compilation", diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 910cf44926098d..5e7c3942e240a9 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -31,9 +31,9 @@ '$(Scenario)' == 'gcstress0x3' or '$(Scenario)' == 'gcstress0xc' or '$(Scenario)' == 'heapverify1' or - '$(Scenario)' == 'gcstress0xc_zapdisable' or - '$(Scenario)' == 'gcstress0xc_zapdisable_jitstress2' or - '$(Scenario)' == 'gcstress0xc_zapdisable_heapverify1' or + '$(Scenario)' == 'gcstress0xc_disabler2r' or + '$(Scenario)' == 'gcstress0xc_disabler2r_jitstress2' or + '$(Scenario)' == 'gcstress0xc_disabler2r_heapverify1' or '$(Scenario)' == 'gcstress0xc_jitstress1' or '$(Scenario)' == 'gcstress0xc_jitstress2' or '$(Scenario)' == 'gcstress0xc_jitminopts_heapverify1'">06:00:00 diff --git a/src/tests/Common/CLRTest.CrossGen.targets b/src/tests/Common/CLRTest.CrossGen.targets index ff8f875df7449a..cacc3980c1a1de 100644 --- a/src/tests/Common/CLRTest.CrossGen.targets +++ b/src/tests/Common/CLRTest.CrossGen.targets @@ -165,9 +165,6 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then fi ReleaseLock fi - - export DOTNET_ZapRequire=$(ZapRequire) - export DOTNET_ZapRequireList=$(AssemblyName) fi ]]> @@ -339,9 +336,6 @@ if defined RunCrossGen2 ( ECHO R2RDump failed with exitcode - !R2RDumpStatus! Exit /b 1 ) - - set DOTNET_ZapRequire=$(ZapRequire) - set DOTNET_ZapRequireList=$(AssemblyName) ) ]]> diff --git a/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs b/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs index 75014ad32484ce..ec323167143407 100644 --- a/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs +++ b/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs @@ -17,7 +17,7 @@ public static class CoreClrConfigurationDetection public static bool IsJitStressRegs => !string.Equals(GetEnvironmentVariableValue("JitStressRegs"), "0", StringComparison.InvariantCulture); public static bool IsJitMinOpts => string.Equals(GetEnvironmentVariableValue("JITMinOpts"), "1", StringComparison.InvariantCulture); public static bool IsTailCallStress => string.Equals(GetEnvironmentVariableValue("TailcallStress"), "1", StringComparison.InvariantCulture); - public static bool IsZapDisable => string.Equals(GetEnvironmentVariableValue("ZapDisable"), "1", StringComparison.InvariantCulture); + public static bool IsDisableR2R => string.Equals(GetEnvironmentVariableValue("ReadyToRun"), "0", StringComparison.InvariantCulture); public static bool IsGCStress3 => CompareGCStressModeAsLower(GetEnvironmentVariableValue("GCStress"), "0x3", "3"); public static bool IsGCStressC => CompareGCStressModeAsLower(GetEnvironmentVariableValue("GCStress"), "0xC", "C"); @@ -29,7 +29,7 @@ public static class CoreClrConfigurationDetection public static bool IsStressTest => IsGCStress || - IsZapDisable || + IsDisableR2R || IsTailCallStress || IsJitStressRegs || IsJitStress || diff --git a/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs b/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs index e5a48a348d1573..1aa30b1f134dc7 100644 --- a/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs +++ b/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs @@ -22,9 +22,9 @@ public enum RuntimeTestModes JitMinOpts = 1 << 3, // DOTNET_JITMinOpts is set. TailcallStress = 1 << 4, // DOTNET_TailcallStress is set. - // ZapDisable says to not use NGEN or ReadyToRun images. + // DisableR2R says to not use ReadyToRun images. // This means we JIT everything. - ZapDisable = 1 << 5, // DOTNET_ZapDisable is set. + DisableR2R = 1 << 5, // DOTNET_ReadyToRun=0 // GCStress3 forces a GC at various locations, typically transitions // to/from the VM from managed code. diff --git a/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs b/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs index c5a94972b7098f..50a7b0943e5926 100644 --- a/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs +++ b/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs @@ -908,9 +908,9 @@ private static ImmutableArray DecorateWithSkipOnCoreClrConfiguration( { conditions.Add($"!{ConditionClass}.IsTailcallStress"); } - if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.ZapDisable)) + if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.DisableR2R)) { - conditions.Add($"!{ConditionClass}.IsZapDisable"); + conditions.Add($"!{ConditionClass}.IsDisableR2R"); } if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.AnyGCStress)) diff --git a/src/tests/Common/testenvironment.proj b/src/tests/Common/testenvironment.proj index d1bc1d1a94c427..7d0ba71411fab9 100644 --- a/src/tests/Common/testenvironment.proj +++ b/src/tests/Common/testenvironment.proj @@ -53,7 +53,6 @@ DOTNET_JitStressRegs; DOTNET_TailcallStress; DOTNET_ReadyToRun; - DOTNET_ZapDisable; DOTNET_TC_OnStackReplacement; DOTNET_TC_QuickJitForLoops; DOTNET_TC_OnStackReplacement_InitialCounter; @@ -207,11 +206,11 @@ - + - - - + + + diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index 60badfac3c1a38..fbdf9eb9cd280a 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -163,11 +163,6 @@ true - - - 2 - - diff --git a/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs b/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs index 393691bd4336d7..d95bf83ecb8d9c 100644 --- a/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs +++ b/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs @@ -4,7 +4,6 @@ /* * Regression test for Dev11 243742 [Triton] * precommands: -* set DOTNET_ZAPREQUIRE=2 * set CORECLR_PREJITType=MDIL * del /q nitype.signal * diff --git a/src/tests/readytorun/tests/genericsload/usegenericfield.csproj b/src/tests/readytorun/tests/genericsload/usegenericfield.csproj index 67b266b8658faa..d543cd9e47699d 100644 --- a/src/tests/readytorun/tests/genericsload/usegenericfield.csproj +++ b/src/tests/readytorun/tests/genericsload/usegenericfield.csproj @@ -2,7 +2,6 @@ true - 1 1 From 4cdc80ebf4ee362e257fbd68f572cd76506b74e5 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Wed, 21 Feb 2024 09:55:56 -0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Jan Kotas --- src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs b/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs index d95bf83ecb8d9c..1842f13cc9e099 100644 --- a/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs +++ b/src/tests/JIT/Regression/Dev11/External/Dev11_243742/app.cs @@ -3,9 +3,6 @@ /* * Regression test for Dev11 243742 [Triton] -* precommands: -* set CORECLR_PREJITType=MDIL -* del /q nitype.signal * * Execute: * %CORE_ROOT%\fxprun.exe App.exe