From 5f86d87e92bd23b17f7d7cf358a4d689b0985aed Mon Sep 17 00:00:00 2001 From: Tomas Date: Wed, 22 Jul 2020 01:30:08 +0200 Subject: [PATCH 1/3] Crossgen2 GC stress pipeline --- eng/pipelines/coreclr/crossgen2-gcstress.yml | 60 ++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 eng/pipelines/coreclr/crossgen2-gcstress.yml diff --git a/eng/pipelines/coreclr/crossgen2-gcstress.yml b/eng/pipelines/coreclr/crossgen2-gcstress.yml new file mode 100644 index 00000000000000..7942e747e26f64 --- /dev/null +++ b/eng/pipelines/coreclr/crossgen2-gcstress.yml @@ -0,0 +1,60 @@ +trigger: none + +pr: none + +schedules: +- cron: "0 6 * * 0,1" + displayName: Sat and Sun at 10:00 PM (UTC-8:00) + branches: + include: + - master + always: true + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml + buildConfig: checked + platforms: + - Linux_x64 + - Linux_arm64 + - OSX_x64 + - Windows_NT_x64 + - Windows_NT_arm64 + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: gcstress-extra + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: gcstress-extra + liveLibrariesBuildConfig: Release + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: checked + platforms: + - Linux_x64 + - Linux_arm64 + - OSX_x64 + - Windows_NT_x64 + - Windows_NT_arm64 + jobParameters: + testGroup: gcstress-extra + readyToRun: true + crossgen2: true + compositeBuildMode: true + displayNameArgs: Composite + liveLibrariesBuildConfig: Release From 6692b14a82b6c943a82d2f42828185c04f951c00 Mon Sep 17 00:00:00 2001 From: Tomas Date: Sun, 26 Jul 2020 21:05:59 +0200 Subject: [PATCH 2/3] Suppress GC stress mode for the duration of Crossgen2 compilation --- src/coreclr/tests/src/CLRTest.CrossGen.targets | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/coreclr/tests/src/CLRTest.CrossGen.targets b/src/coreclr/tests/src/CLRTest.CrossGen.targets index a1104376140342..f94aecae1ee724 100644 --- a/src/coreclr/tests/src/CLRTest.CrossGen.targets +++ b/src/coreclr/tests/src/CLRTest.CrossGen.targets @@ -84,6 +84,10 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then __ResponseFile="$__OutputFile.rsp" rm $__ResponseFile + // Suppress the GC stress COMPlus for the duration of Crossgen2 execution + local gcStressModeToRestore = $COMPlus_GCStress; + export COMPlus_GCStress= + __Command=$_DebuggerFullPath # Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path if [ ! -z ${__TestDotNetCmd+x} ] %3B then @@ -109,6 +113,8 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then echo "Running CrossGen2: $__Command" $__Command __cg2ExitCode=$? + + export COMPlus_GCStress=$gcStressModeToRestore } if [ ! -z ${CompositeBuildMode+x} ]%3B then @@ -212,6 +218,10 @@ if defined RunCrossGen2 ( set __ResponseFile=!__OutputFile!.rsp del /Q !__ResponseFile! + REM Suppress GC stress mode for the duration of Crossgen2 execution + set __gcStressModeToRestore=!COMPlus_GCStress! + set COMPlus_GCStress= + set __Command=!_DebuggerFullPath! REM Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path if defined __TestDotNetCmd ( @@ -237,6 +247,8 @@ if defined RunCrossGen2 ( echo "!__Command!" call !__Command! set CrossGen2Status=!ERRORLEVEL! + set COMPlus_GCStress=!__gcStressModeToRestore! + Exit /b 0 :DoneCrossgen2Operations From 63951e91c47fab319315558a0b44a74235108ca1 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Tue, 28 Jul 2020 00:58:14 +0200 Subject: [PATCH 3/3] Address Bruce's PR feedback --- src/coreclr/tests/src/CLRTest.CrossGen.targets | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/coreclr/tests/src/CLRTest.CrossGen.targets b/src/coreclr/tests/src/CLRTest.CrossGen.targets index f94aecae1ee724..926f6ec6d15119 100644 --- a/src/coreclr/tests/src/CLRTest.CrossGen.targets +++ b/src/coreclr/tests/src/CLRTest.CrossGen.targets @@ -86,7 +86,11 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then // Suppress the GC stress COMPlus for the duration of Crossgen2 execution local gcStressModeToRestore = $COMPlus_GCStress; + local heapVerifyModeToRestore = $COMPlus_HeapVerify; + local readyToRunModeToRestore = $COMPlus_ReadyToRun; export COMPlus_GCStress= + export COMPlus_HeapVerify= + export COMPlus_ReadyToRun= __Command=$_DebuggerFullPath # Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path @@ -115,6 +119,8 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then __cg2ExitCode=$? export COMPlus_GCStress=$gcStressModeToRestore + export COMPlus_HeapVerify=$heapVerifyModeToRestore + export COMPlus_ReadyToRun=$readyToRunModeToRestore } if [ ! -z ${CompositeBuildMode+x} ]%3B then @@ -221,6 +227,10 @@ if defined RunCrossGen2 ( REM Suppress GC stress mode for the duration of Crossgen2 execution set __gcStressModeToRestore=!COMPlus_GCStress! set COMPlus_GCStress= + set __heapVerifyModeToRestore=!COMPlus_HeapVerify! + set COMPlus_HeapVerify= + set __readyToRunModeToRestore=!COMPlus_ReadyToRun! + set COMPlus_ReadyToRun= set __Command=!_DebuggerFullPath! REM Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path @@ -248,6 +258,8 @@ if defined RunCrossGen2 ( call !__Command! set CrossGen2Status=!ERRORLEVEL! set COMPlus_GCStress=!__gcStressModeToRestore! + set COMPlus_HeapVerify=!__heapVerifyModeToRestore! + set COMPlus_ReadyToRun=!__readyToRunModeToRestore! Exit /b 0