diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml index 3d943fce71b44f..209943a1026d73 100644 --- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml +++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml @@ -355,6 +355,23 @@ jobs: logicalmachine: 'perftiger' pgoRunType: --nodynamicpgo + # run coreclr perftiger microbenchmarks physical promotion perf jobs + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - windows_x64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' + physicalPromotionRunType: -PhysicalPromotion + # run coreclr perfowl microbenchmarks perf job - template: /eng/pipelines/common/platform-matrix.yml parameters: diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index 56766c72187365..9beaf0884e6999 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -17,6 +17,7 @@ parameters: additionalSetupParameters: '' logicalMachine: '' pgoRunType: '' + physicalPromotionRunType: '' javascriptEngine: 'NoJS' iOSLlvmBuild: 'False' iOSStripSymbols: 'False' @@ -38,8 +39,8 @@ jobs: - template: ${{ parameters.runJobTemplate }} parameters: # Compute job name from template parameters - jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }} - displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }} + jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }} + displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }} pool: ${{ parameters.pool }} buildConfig: ${{ parameters.buildConfig }} archType: ${{ parameters.archType }} @@ -55,6 +56,7 @@ jobs: container: ${{ parameters.container }} logicalmachine: ${{ parameters.logicalmachine }} pgoRunType: ${{ parameters.pgoRunType }} + physicalPromotionRunType: ${{ parameters.physicalPromotionRunType }} javascriptEngine: ${{ parameters.javascriptEngine }} iosLlvmBuild: ${{ parameters.iosLlvmBuild }} iosStripSymbols: ${{ parameters.iosStripSymbols }} diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index a3c1d5b125ae68..8adfe338624883 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -16,7 +16,8 @@ parameters: timeoutInMinutes: 320 # optional -- timeout for the job enableTelemetry: false # optional -- enable for telemetry liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run - pgoRunType: '' # optional -- Flag for running with no pgo, dynamic pgo, or full pgo + pgoRunType: '' # optional -- different PGO configurations + physicalPromotionRunType: '' # optional -- different physical promotion configurations runtimeType: 'coreclr' # optional -- Sets the runtime as coreclr or mono codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono projectFile: 'microbenchmarks.proj' # optional -- project file to build helix workitems @@ -153,11 +154,11 @@ jobs: _Framework: ${{ framework }} steps: - ${{ parameters.steps }} - - powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} -UseLocalCommitTime ${{ parameters.extraSetupParameters }} + - powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} -UseLocalCommitTime ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Windows) condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} --uselocalcommittime ${{ parameters.extraSetupParameters }} + - script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} --uselocalcommittime ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Unix) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} @@ -182,6 +183,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}' + artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}_${{ parameters.physicalPromotionRunType }}' continueOnError: true condition: always() diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index a826f39f045e17..0dbc37ef01faa4 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -24,6 +24,7 @@ Param( [switch] $iOSMono, [switch] $iOSNativeAOT, [switch] $NoDynamicPGO, + [switch] $PhysicalPromotion, [switch] $iOSLlvmBuild, [switch] $iOSStripSymbols, [string] $MauiVersion, @@ -63,13 +64,11 @@ else { $Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open" } -if($MonoInterpreter) -{ +if ($MonoInterpreter) { $ExtraBenchmarkDotNetArguments = "--category-exclusion-filter NoInterpreter" } -if($MonoDotnet -ne "") -{ +if ($MonoDotnet -ne "") { $Configurations += " LLVM=$LLVM MonoInterpreter=$MonoInterpreter MonoAOT=$MonoAOT" if($ExtraBenchmarkDotNetArguments -eq "") { @@ -83,11 +82,14 @@ if($MonoDotnet -ne "") } } -if($NoDynamicPGO) -{ +if ($NoDynamicPGO) { $Configurations += " PGOType=nodynamicpgo" } +if ($PhysicalPromotion) { + $Configurations += " PhysicalPromotionType=physicalpromotion" +} + if ($iOSMono) { $Configurations += " iOSLlvmBuild=$iOSLlvmBuild" $Configurations += " iOSStripSymbols=$iOSStripSymbols" @@ -106,13 +108,15 @@ if($Branch.Contains("refs/heads/release")) $CommonSetupArguments="--channel $CleanedBranchName --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture" $SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments" -if($NoDynamicPGO) -{ +if ($NoDynamicPGO) { $SetupArguments = "$SetupArguments --no-dynamic-pgo" } -if($UseLocalCommitTime) -{ +if ($PhysicalPromotion) { + $SetupArguments = "$SetupArguments --physical-promotion" +} + +if ($UseLocalCommitTime) { $LocalCommitTime = (git show -s --format=%ci $CommitSha) $SetupArguments = "$SetupArguments --commit-time `"$LocalCommitTime`"" } @@ -126,8 +130,7 @@ else { git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory } -if($MonoDotnet -ne "") -{ +if ($MonoDotnet -ne "") { $UsingMono = "true" $MonoDotnetPath = (Join-Path $PayloadDirectory "dotnet-mono") Move-Item -Path $MonoDotnet -Destination $MonoDotnetPath @@ -142,8 +145,7 @@ if ($UseBaselineCoreRun) { Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot } -if($MauiVersion -ne "") -{ +if ($MauiVersion -ne "") { $SetupArguments = "$SetupArguments --maui-version $MauiVersion" } diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh index 38fbbc1a980de3..e69ab945cf91bc 100755 --- a/eng/testing/performance/performance-setup.sh +++ b/eng/testing/performance/performance-setup.sh @@ -146,6 +146,10 @@ while (($# > 0)); do nodynamicpgo=true shift 1 ;; + --physicalpromotion) + physicalpromotion=true + shift 1 + ;; --compare) compare=true shift 1 @@ -231,6 +235,7 @@ while (($# > 0)); do echo " --mauiversion Set the maui version for Mono/Maui runs" echo " --uselocalcommittime Pass local runtime commit time to the setup script" echo " --nodynamicpgo Set for No dynamic PGO runs" + echo " --physicalpromotion Set for runs with physical promotion" echo "" exit 1 ;; @@ -347,6 +352,10 @@ if [[ "$nodynamicpgo" == "true" ]]; then configurations="$configurations PGOType=nodynamicpgo" fi +if [[ "$physicalpromotion" == "true" ]]; then + configurations="$configurations PhysicalPromotionType=physicalpromotion" +fi + cleaned_branch_name="main" @@ -415,6 +424,10 @@ if [[ "$nodynamicpgo" == "true" ]]; then setup_arguments="$setup_arguments --no-dynamic-pgo" fi +if [[ "$physicalpromotion" == "true" ]]; then + setup_arguments="$setup_arguments --physical-promotion" +fi + if [[ "$monoaot" == "true" ]]; then monoaot_dotnet_path=$payload_directory/monoaot mv $monoaot_path $monoaot_dotnet_path