From ca4c3f6f97b23770168a1fb0b6a4c3f686301abc Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 25 Apr 2023 14:32:10 +0200
Subject: [PATCH 01/57] Add Native AOT iOS perf scenarios

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml  | 38 +++++++++++
 .../templates/build-perf-sample-apps.yml      | 19 ++++++
 eng/pipelines/coreclr/templates/perf-job.yml  | 35 ++++++++--
 .../performance/ios_nativeaot_scenarios.proj  | 65 +++++++++++++++++++
 eng/testing/performance/performance-setup.sh  | 16 +++++
 src/mono/sample/iOS-NativeAOT/Program.csproj  |  4 +-
 .../Templates/CMakeLists.txt.template         |  2 +
 7 files changed, 171 insertions(+), 8 deletions(-)
 create mode 100644 eng/testing/performance/ios_nativeaot_scenarios.proj

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 6cf2f828fd4351..e03eeadcbeb7e0 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -102,6 +102,28 @@ jobs:
           archiveType: tar
           tarCompression: gz
 
+  # build NativeAOT iOS scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - ios_arm64
+      jobParameters:
+        buildArgs: -s clr+clr.aot -c $(_BuildConfig)
+        nameSuffix: iOSNativeAOT
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: iOS NativeAOT Artifacts
+          artifactName: iOSNativeAOTarm64
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
+
   # build mono
   - template: /eng/pipelines/common/platform-matrix.yml
     parameters:
@@ -160,6 +182,22 @@ jobs:
         logicalmachine: 'perfiphone12mini'
         iOSLlvmBuild: True
 
+  # run NativeAOT iOS scenarios scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSNativeAOT
+        projectFile: ios_nativeaot_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+
   # run mono microbenchmarks perf job
   - template: /eng/pipelines/common/platform-matrix.yml
     parameters:
diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index bdc0475fb5da84..1f39fa887909de 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -78,3 +78,22 @@ steps:
         artifactName: iOSSampleAppLLVM
         archiveExtension: '.zip'
         archiveType: zip
+    - script: make hello-app TARGET_OS=ios MONO_ARCH=arm64 MONO_CONFIG=Release DEPLOY_AND_RUN=false
+      env:
+        DevTeamProvisioning: '-'
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
+      displayName: Build HelloiOS Native AOT sample app
+    - task: PublishBuildArtifacts@1
+      condition: succeededOrFailed()
+      displayName: 'Publish binlog'
+      inputs:
+        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/msbuild.binlog
+        artifactName:  ${{ parameters.artifactName }}
+    - template: /eng/pipelines/common/upload-artifact-step.yml
+      parameters:
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        includeRootFolder: true
+        displayName: iOS Sample App
+        artifactName: iOSSampleApp
+        archiveExtension: '.zip'
+        archiveType: zip
diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index c95a231e619855..d475aac242ca5b 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -67,7 +67,7 @@ jobs:
     # Test job depends on the corresponding build job
     ${{ if eq(parameters.downloadSpecificBuild.buildId, '') }}:
       dependsOn:
-      - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'wasm')) }}:
+      - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT', 'wasm')) }}:
         - ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
       - ${{ if and(ne(parameters.liveLibrariesBuildConfig, ''), eq(parameters.skipLiveLibrariesDownload, 'false')) }}:
         - ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
@@ -81,13 +81,15 @@ jobs:
         - ${{ 'build_android_arm64_release_AndroidMono' }}
       - ${{ if eq(parameters.runtimeType, 'iOSMono')}}:
         - ${{ 'build_ios_arm64_release_iOSMono' }}
+      - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT')}}:
+        - ${{ 'build_ios_arm64_release_iOSNativeAOT' }}
 
-    ${{ if and(eq(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono'))) }}:
+    ${{ if and(eq(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) }}:
       ${{ if eq(parameters.runtimeType, 'mono') }}:
         extraSetupParameters: -Architecture ${{ parameters.archType }} -MonoDotnet $(Build.SourcesDirectory)\.dotnet-mono
       ${{ if eq(parameters.runtimeType, 'coreclr') }}:
         extraSetupParameters: -CoreRootDirectory $(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.Release\Tests\Core_Root -Architecture ${{ parameters.archType }}
-    ${{ if and(ne(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono'))) }}:
+    ${{ if and(ne(parameters.osGroup, 'windows'), not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT'))) }}:
       ${{ if and(eq(parameters.runtimeType, 'mono'), ne(parameters.codeGenType, 'AOT')) }}:
         extraSetupParameters: --architecture ${{ parameters.archType }} --monodotnet $(Build.SourcesDirectory)/.dotnet-mono
       ${{ if and(eq(parameters.runtimeType, 'wasm'), ne(parameters.codeGenType, 'AOT')) }}:
@@ -104,6 +106,8 @@ jobs:
       extraSetupParameters: -Architecture ${{ parameters.archType }} -AndroidMono
     ${{ if in(parameters.runtimeType, 'iosMono') }}:
       extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }}
+    ${{ if in(parameters.runtimeType, 'iOSNativeAOT') }}:
+      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot
 
     variables:
     - ${{ each variable in parameters.variables }}:
@@ -141,7 +145,7 @@ jobs:
           displayName: 'live-built libraries'
 
     # Download coreclr
-    - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'wasm')) }}:
+    - ${{ if not(in(parameters.runtimeType, 'AndroidMono', 'iOSMono', 'iOSNativeAOT', 'wasm')) }}:
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
           unpackFolder: $(buildProductRootFolderPath)
@@ -244,6 +248,25 @@ jobs:
           artifactName: 'iOSSampleAppLLVM'
           checkDownloadedFiles: true
 
+    # Download iOSNativeAOT tests
+    - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT') }}: 
+      - template: /eng/pipelines/common/download-artifact-step.yml
+        parameters:
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld
+          cleanUnpackFolder: false
+          artifactFileName: 'iOSSampleApp.zip'
+          artifactName: 'iOSSampleApp'
+          displayName: 'iOS Sample App'
+      # same artifact as above but don't extract .zip
+      - task: DownloadBuildArtifacts@0
+        displayName: 'Download iOS Sample App'
+        inputs:
+          buildType: current
+          downloadType: single
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip'
+          artifactName: 'iOSSampleApp'
+          checkDownloadedFiles: true
+
     # Create Core_Root
     - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg)
       displayName: Create Core_Root
@@ -252,8 +275,8 @@ jobs:
     # Copy the runtime directory into the testhost folder to include OOBs.
     - script: "build.cmd -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)\\bin\\mono\\$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\runtime\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\shared\\Microsoft.NETCore.App\\$(productVersion) /E /I /Y;xcopy $(Build.SourcesDirectory)\\artifacts\\bin\\testhost\\net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)\\* $(Build.SourcesDirectory)\\.dotnet-mono /E /I /Y;copy $(Build.SourcesDirectory)\\artifacts\\bin\\coreclr\\$(osGroup).$(archType).$(buildConfigUpper)\\corerun.exe $(Build.SourcesDirectory)\\.dotnet-mono\\shared\\Microsoft.NETCore.App\\$(productVersion)\\corerun.exe"
       displayName: "Create mono dotnet (Windows)"
-      condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono')))
+      condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), eq(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')))
 
     - script: "mkdir $(Build.SourcesDirectory)/.dotnet-mono;./build.sh -subset libs.pretest -configuration release -ci -arch $(archType) -testscope innerloop /p:RuntimeArtifactsPath=$(librariesDownloadDir)/bin/mono/$(osGroup).$(archType).$(buildConfigUpper) /p:RuntimeFlavor=mono;cp $(Build.SourcesDirectory)/artifacts/bin/runtime/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/artifacts/bin/testhost/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/shared/Microsoft.NETCore.App/$(productVersion) -rf;cp $(Build.SourcesDirectory)/artifacts/bin/testhost/net8.0-$(osGroup)-$(buildConfigUpper)-$(archType)/* $(Build.SourcesDirectory)/.dotnet-mono -r;cp $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)/corerun $(Build.SourcesDirectory)/.dotnet-mono/shared/Microsoft.NETCore.App/$(productVersion)/corerun"
       displayName: "Create mono dotnet (Linux)"
-      condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono')))
+      condition: and(and(succeeded(), eq(variables.runtimeFlavorName, 'Mono')), ne(variables.osGroup, 'windows'), not(in('${{ parameters.runtimeType }}', 'AndroidMono', 'iOSMono', 'iOSNativeAOT')))
diff --git a/eng/testing/performance/ios_nativeaot_scenarios.proj b/eng/testing/performance/ios_nativeaot_scenarios.proj
new file mode 100644
index 00000000000000..306929d06b13a1
--- /dev/null
+++ b/eng/testing/performance/ios_nativeaot_scenarios.proj
@@ -0,0 +1,65 @@
+<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
+  <PropertyGroup>
+    <IncludeXHarnessCli>true</IncludeXHarnessCli>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
+    <Python>python3</Python>
+    <HelixPreCommands>$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk</HelixPreCommands>
+    <HelixPreCommands>$(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/startup/Startup</HelixPreCommands>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
+      <PayloadDirectory>%(Identity)</PayloadDirectory>
+    </HelixCorrelationPayload>
+  </ItemGroup>
+
+  <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
+    <ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>
+
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
+    <ScenarioDirectory>$HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/</ScenarioDirectory>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT .app">
+      <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/ ./app;$(Python) pre.py --name app</PreCommands>
+      <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
+      <PostCommands>$(Python) post.py</PostCommands>
+    </HelixWorkItem>
+    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT Zip Size">
+      <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/iOSSampleApp/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip</PreCommands>
+      <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
+      <PostCommands>$(Python) post.py</PostCommands>
+    </HelixWorkItem>
+    <XHarnessAppBundleToTest Include="Device Startup - iOS Native AOT HelloWorld">
+      <AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
+      <WorkItemTimeout>00:15:00</WorkItemTimeout>
+      <TestTarget>ios-device</TestTarget>
+      <CustomCommands>
+        <![CDATA[
+          # PreCommands
+          export XHARNESSPATH=$XHARNESS_CLI_PATH
+
+          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
+          cp -f embedded.mobileprovision $(ScenarioDirectory)helloios/HelloiOS.app
+          cd $(ScenarioDirectory)helloios
+          sign HelloiOS.app
+
+          $(Python) pre.py --name HelloiOS.app
+
+          # Testing commands
+          $(Python) test.py devicestartup --device-type ios --package-path HelloiOS.app --package-name net.dot.HelloiOS --scenario-name "%(Identity)"
+          ((result=$?))
+          
+          # Post commands
+          $(Python) post.py
+          exit $result
+        ]]>
+      </CustomCommands>
+    </XHarnessAppBundleToTest>
+  </ItemGroup>
+</Project>
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 4121aee0e8d7e5..edca8697a7af64 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -37,6 +37,7 @@ logical_machine=
 javascript_engine="v8"
 iosmono=false
 iosllvmbuild=""
+iosnativeaot=false
 maui_version=""
 use_local_commit_time=false
 only_sanity=false
@@ -159,6 +160,10 @@ while (($# > 0)); do
       iosmono=true
       shift 1
       ;;
+    --iosnativeaot)
+      iosnativeaot=true
+      shift 1
+      ;;
     --iosllvmbuild)
       iosllvmbuild=$2
       shift 2
@@ -210,6 +215,7 @@ while (($# > 0)); do
       echo "  --dotnetversions               Passed as '--dotnet-versions <value>' to the setup script"
       echo "  --alpine                       Set for runs on Alpine"
       echo "  --iosmono                      Set for ios Mono/Maui runs"
+      echo "  --iosnativeaot                 Set for ios Native AOT runs"
       echo "  --iosllvmbuild                 Set LLVM for iOS Mono/Maui runs"
       echo "  --mauiversion                  Set the maui version for Mono/Maui runs"
       echo "  --uselocalcommittime           Pass local runtime commit time to the setup script"
@@ -318,6 +324,11 @@ if [[ "$iosmono" == "true" ]]; then
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
 fi
 
+if [[ "$iosnativeaot" == "true" ]]; then
+    configurations="$configurations"
+    extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
+fi
+
 cleaned_branch_name="main"
 if [[ $branch == *"refs/heads/release"* ]]; then
     cleaned_branch_name=${branch/refs\/heads\//}
@@ -410,6 +421,11 @@ if [[ "$iosmono" == "true" ]]; then
     fi
 fi
 
+if [[ "$iosnativeaot" == "true" ]]; then
+    mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld $payload_directory/iosHelloWorld
+    mkdir -p $payload_directory/iosHelloWorldZip && cp -rv $source_directory/iosHelloWorldZip $payload_directory/iosHelloWorldZip
+fi
+
 ci=true
 
 _script_dir=$(pwd)/eng/common
diff --git a/src/mono/sample/iOS-NativeAOT/Program.csproj b/src/mono/sample/iOS-NativeAOT/Program.csproj
index aa08743cddbab8..958d47737654f5 100644
--- a/src/mono/sample/iOS-NativeAOT/Program.csproj
+++ b/src/mono/sample/iOS-NativeAOT/Program.csproj
@@ -29,8 +29,8 @@
     <DevTeamProvisioning Condition="'$(DevTeamProvisioning)' == ''">adhoc</DevTeamProvisioning>
     <EnableAppSandbox Condition="'$(EnableAppSandbox)' == ''">false</EnableAppSandbox>
   </PropertyGroup>
-
-  <Import Project="$(CoreClrProjectRoot)nativeaot\BuildIntegration\Microsoft.NETCore.Native.targets" />
+  <!-- Fix temporary regression, will be fixed on the main in a separate PR -->
+  <Import Project="$(CoreClrProjectRoot)nativeaot\BuildIntegration\Microsoft.DotNet.ILCompiler.SingleEntry.targets" />
   <UsingTask TaskName="AppleAppBuilderTask"
              AssemblyFile="$(AppleAppBuilderTasksAssemblyPath)" />
 
diff --git a/src/tasks/AppleAppBuilder/Templates/CMakeLists.txt.template b/src/tasks/AppleAppBuilder/Templates/CMakeLists.txt.template
index a95bf1da9a550c..29f0b6eae626ca 100644
--- a/src/tasks/AppleAppBuilder/Templates/CMakeLists.txt.template
+++ b/src/tasks/AppleAppBuilder/Templates/CMakeLists.txt.template
@@ -82,6 +82,8 @@ target_link_libraries(
 if(%UseNativeAOTRuntime%)
 target_link_libraries(
     %ProjectName%
+    PRIVATE
     "-Wl,-u,_NativeAOT_StaticInitialization"
+    "-Wl,-segprot,__THUNKS,rx,rx"
 )
 endif()
\ No newline at end of file

From e5ffed924e6de1a4112761852c2b472840ab298d Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 25 Apr 2023 20:48:17 +0200
Subject: [PATCH 02/57] Disable other jobs for testing

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 590 +++++++++----------
 eng/pipelines/coreclr/perf.yml               |  14 +-
 2 files changed, 302 insertions(+), 302 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index e03eeadcbeb7e0..9cdb896ed40c6e 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -1,106 +1,106 @@
 jobs:
 
-- ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+# - ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
 
-  # build mono
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-      runtimeFlavor: mono
-      buildConfig: release
-      platforms:
-      - linux_x64
+#   # build mono
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+#       runtimeFlavor: mono
+#       buildConfig: release
+#       platforms:
+#       - linux_x64
 
-  # build coreclr and libraries
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-      buildConfig: release
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
+#   # build coreclr and libraries
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+#       buildConfig: release
+#       platforms:
+#       - linux_x64
+#       jobParameters:
+#         testGroup: perf
 
-- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+# - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
 
-  # build coreclr and libraries
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-      buildConfig: release
-      platforms:
-      - linux_x64
-      - windows_x64
-      - windows_x86
-      - linux_musl_x64
-      jobParameters:
-        testGroup: perf
+#   # build coreclr and libraries
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+#       buildConfig: release
+#       platforms:
+#       - linux_x64
+#       - windows_x64
+#       - windows_x86
+#       - linux_musl_x64
+#       jobParameters:
+#         testGroup: perf
 
-  # build mono for AOT
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - linux_x64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: AOT
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: AOT Mono Artifacts
-          artifactName: LinuxMonoAOTx64
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+#   # build mono for AOT
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/global-build-job.yml
+#       buildConfig: release
+#       runtimeFlavor: mono
+#       platforms:
+#       - linux_x64
+#       jobParameters:
+#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+#         nameSuffix: AOT
+#         isOfficialBuild: false
+#         extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
+#         extraStepsParameters:
+#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+#           includeRootFolder: true
+#           displayName: AOT Mono Artifacts
+#           artifactName: LinuxMonoAOTx64
+#           archiveExtension: '.tar.gz'
+#           archiveType: tar
+#           tarCompression: gz
 
-  # build mono Android scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - android_arm64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: AndroidMono
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: Android Mono Artifacts
-          artifactName: AndroidMonoarm64
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+#   # build mono Android scenarios
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/global-build-job.yml
+#       buildConfig: release
+#       runtimeFlavor: mono
+#       platforms:
+#       - android_arm64
+#       jobParameters:
+#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+#         nameSuffix: AndroidMono
+#         isOfficialBuild: false
+#         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+#         extraStepsParameters:
+#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+#           includeRootFolder: true
+#           displayName: Android Mono Artifacts
+#           artifactName: AndroidMonoarm64
+#           archiveExtension: '.tar.gz'
+#           archiveType: tar
+#           tarCompression: gz
 
-  # build mono iOS scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - ios_arm64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: iOSMono
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: iOS Mono Artifacts
-          artifactName: iOSMonoarm64
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+#   # build mono iOS scenarios
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/global-build-job.yml
+#       buildConfig: release
+#       runtimeFlavor: mono
+#       platforms:
+#       - ios_arm64
+#       jobParameters:
+#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+#         nameSuffix: iOSMono
+#         isOfficialBuild: false
+#         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+#         extraStepsParameters:
+#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+#           includeRootFolder: true
+#           displayName: iOS Mono Artifacts
+#           artifactName: iOSMonoarm64
+#           archiveExtension: '.tar.gz'
+#           archiveType: tar
+#           tarCompression: gz
 
   # build NativeAOT iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -124,63 +124,63 @@ jobs:
           archiveType: tar
           tarCompression: gz
 
-  # build mono
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-      runtimeFlavor: mono
-      buildConfig: release
-      platforms:
-      - linux_x64
+  # # build mono
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+  #     runtimeFlavor: mono
+  #     buildConfig: release
+  #     platforms:
+  #     - linux_x64
 
-  # run android scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - windows_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: AndroidMono
-        projectFile: android_scenarios.proj
-        runKind: android_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfpixel4a'
+  # # run android scenarios
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - windows_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: AndroidMono
+  #       projectFile: android_scenarios.proj
+  #       runKind: android_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfpixel4a'
 
-  # run mono iOS scenarios scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSMono
-        projectFile: ios_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSLlvmBuild: False
+  # # run mono iOS scenarios scenarios
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSMono
+  #       projectFile: ios_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSLlvmBuild: False
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSMono
-        projectFile: ios_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSLlvmBuild: True
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSMono
+  #       projectFile: ios_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSLlvmBuild: True
 
   # run NativeAOT iOS scenarios scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -198,161 +198,161 @@ jobs:
         runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
         logicalmachine: 'perfiphone12mini'
 
-  # run mono microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        runtimeType: mono
-        projectFile: microbenchmarks.proj
-        runKind: micro_mono
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run mono microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       runtimeType: mono
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro_mono
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run mono interpreter perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        runtimeType: mono
-        codeGenType: 'Interpreter'
-        projectFile: microbenchmarks.proj
-        runKind: micro_mono
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run mono interpreter perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       runtimeType: mono
+  #       codeGenType: 'Interpreter'
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro_mono
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run mono aot microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
-      buildConfig: release
-      runtimeFlavor: aot
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        runtimeType: mono
-        codeGenType: 'AOT'
-        projectFile: microbenchmarks.proj
-        runKind: micro_mono
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run mono aot microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
+  #     buildConfig: release
+  #     runtimeFlavor: aot
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       runtimeType: mono
+  #       codeGenType: 'AOT'
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro_mono
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run coreclr perftiger microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      - windows_x64
-      - windows_x86
-      - linux_musl_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: microbenchmarks.proj
-        runKind: micro
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run coreclr perftiger microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     - windows_x64
+  #     - windows_x86
+  #     - linux_musl_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run coreclr perftiger microbenchmarks pgo 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'
-        pgoRunType: -NoPgo
+  # # run coreclr perftiger microbenchmarks pgo 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'
+  #       pgoRunType: -NoPgo
 
-  - 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'
-        pgoRunType: -DynamicPgo
+  # - 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'
+  #       pgoRunType: -DynamicPgo
 
-  - 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'
-        pgoRunType: -FullPgo
+  # - 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'
+  #       pgoRunType: -FullPgo
 
-  # run coreclr perfowl microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      - windows_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: microbenchmarks.proj
-        runKind: micro
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perfowl'
+  # # run coreclr perfowl microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     - windows_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perfowl'
 
-  # run coreclr crossgen perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      - windows_x64
-      - windows_x86
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: crossgen_perf.proj
-        runKind: crossgen_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perftiger'
+  # # run coreclr crossgen perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     - windows_x64
+  #     - windows_x86
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: crossgen_perf.proj
+  #       runKind: crossgen_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perftiger'
 
   # Uncomment to reenable package replacement
   ## build maui runtime packs
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index ae734cbfdaa76d..04e90898d76f75 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -42,12 +42,12 @@ extends:
     - stage: Build
       jobs:
 
-      - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
-        parameters:
-          collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
-          ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
-            runProfile: 'non-v8'
-          ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
-            runProfile: 'v8'
+      # - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
+      #   parameters:
+      #     collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
+      #     ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+      #       runProfile: 'non-v8'
+      #     ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+      #       runProfile: 'v8'
 
       - template: /eng/pipelines/coreclr/perf-non-wasm-jobs.yml

From 0a9ccaabe466d044a11066ca2ebd302f3dd3a970 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 25 Apr 2023 21:27:45 +0200
Subject: [PATCH 03/57] Update build args

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 9cdb896ed40c6e..56c812d5477957 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -107,11 +107,11 @@ jobs:
     parameters:
       jobTemplate: /eng/pipelines/common/global-build-job.yml
       buildConfig: release
-      runtimeFlavor: coreclr
+      runtimeFlavor: mono
       platforms:
       - ios_arm64
       jobParameters:
-        buildArgs: -s clr+clr.aot -c $(_BuildConfig)
+        buildArgs: -s clr+clr.aot+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT
         isOfficialBuild: false
         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml

From 3827686aa93104be075c4e29b739e5d86600cd30 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 12:17:32 +0200
Subject: [PATCH 04/57] Mock platform as ios is not yet supported

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml               | 4 ++--
 eng/pipelines/coreclr/templates/build-perf-sample-apps.yml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 56c812d5477957..ccf67f6c07fc22 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,9 +109,9 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - ios_arm64
+      - linux_x64
       jobParameters:
-        buildArgs: -s clr+clr.aot+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
+        buildArgs: -s clr+clr.aot -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT
         isOfficialBuild: false
         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index 1f39fa887909de..aeb6244d08c129 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -78,7 +78,7 @@ steps:
         artifactName: iOSSampleAppLLVM
         archiveExtension: '.zip'
         archiveType: zip
-    - script: make hello-app TARGET_OS=ios MONO_ARCH=arm64 MONO_CONFIG=Release DEPLOY_AND_RUN=false
+    - script: make world TARGET_OS=ios MONO_ARCH=arm64 MONO_CONFIG=Release DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'
       workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT

From a0f7d8bf2e5bdc85d9e45425be3cac56207bd9e9 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 12:21:08 +0200
Subject: [PATCH 05/57] Mock platform as ios is not yet supported

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index ccf67f6c07fc22..ecf3ee70fbbf19 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,7 +109,7 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - linux_x64
+      - osx_x64
       jobParameters:
         buildArgs: -s clr+clr.aot -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT

From 0e3542365763dc2d16da29e4ac6cab86594a43e2 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 12:23:25 +0200
Subject: [PATCH 06/57] Mock platform as ios is not yet supported

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index ecf3ee70fbbf19..9efc91a515bc52 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,7 +109,7 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - osx_x64
+        - linux_x64
       jobParameters:
         buildArgs: -s clr+clr.aot -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT

From c607a0fedf3ab27e8303c6e005477ab4c9b9d8b6 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 12:25:55 +0200
Subject: [PATCH 07/57] Mock platform as ios is not yet supported

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 9efc91a515bc52..56c812d5477957 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,9 +109,9 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-        - linux_x64
+      - ios_arm64
       jobParameters:
-        buildArgs: -s clr+clr.aot -c $(_BuildConfig)
+        buildArgs: -s clr+clr.aot+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT
         isOfficialBuild: false
         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml

From 4a9b18389b74be92c74eeb57ef06472e57dc3aed Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 13:31:25 +0200
Subject: [PATCH 08/57] Mock platform as ios is not yet supported

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 56c812d5477957..dbf2b29d42763f 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,7 +109,7 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - ios_arm64
+      - linux_x64
       jobParameters:
         buildArgs: -s clr+clr.aot+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT

From ef40398f8f9d9d13ecdd591a9f9a72b1294e3942 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 13:33:04 +0200
Subject: [PATCH 09/57] Mock platform identifier

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index dbf2b29d42763f..6d2a233520ea64 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,9 +109,9 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - linux_x64
+      - osx_x64
       jobParameters:
-        buildArgs: -s clr+clr.aot+clr.nativeaotruntime+clr.nativeaotlibs+libs -c $(_BuildConfig)
+        buildArgs: -s mono+libs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT
         isOfficialBuild: false
         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml

From e7713cb0f0f9fefcccdfead7954b28a17f07a757 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 13:33:38 +0200
Subject: [PATCH 10/57] Mock platform identifier

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 6d2a233520ea64..6d208eafc6393c 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -109,7 +109,7 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - osx_x64
+      - ios-arm64
       jobParameters:
         buildArgs: -s mono+libs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT

From 4ec65cb261f94a0fa772cb45c0707c89fb8ec5a3 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 13:35:37 +0200
Subject: [PATCH 11/57] Mock platform identifier

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 30 ++++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 6d208eafc6393c..88ac3a86899154 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -111,7 +111,7 @@ jobs:
       platforms:
       - ios-arm64
       jobParameters:
-        buildArgs: -s mono+libs -c $(_BuildConfig)
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT
         isOfficialBuild: false
         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -183,20 +183,20 @@ jobs:
   #       iOSLlvmBuild: True
 
   # run NativeAOT iOS scenarios scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSNativeAOT
-        projectFile: ios_nativeaot_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSNativeAOT
+  #       projectFile: ios_nativeaot_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
 
   # # run mono microbenchmarks perf job
   # - template: /eng/pipelines/common/platform-matrix.yml

From 121e2e934a44980fedf891494c42c7420ba002e0 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 13:38:16 +0200
Subject: [PATCH 12/57] Test NativeAOT build

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 44 ++++++++++----------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 88ac3a86899154..9b1840af5e0414 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -80,27 +80,27 @@ jobs:
 #           archiveType: tar
 #           tarCompression: gz
 
-#   # build mono iOS scenarios
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/global-build-job.yml
-#       buildConfig: release
-#       runtimeFlavor: mono
-#       platforms:
-#       - ios_arm64
-#       jobParameters:
-#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-#         nameSuffix: iOSMono
-#         isOfficialBuild: false
-#         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-#         extraStepsParameters:
-#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-#           includeRootFolder: true
-#           displayName: iOS Mono Artifacts
-#           artifactName: iOSMonoarm64
-#           archiveExtension: '.tar.gz'
-#           archiveType: tar
-#           tarCompression: gz
+  # build mono iOS scenarios
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - ios_arm64
+  #     jobParameters:
+  #       buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+  #       nameSuffix: iOSMono
+  #       isOfficialBuild: false
+  #       extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+  #       extraStepsParameters:
+  #         rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+  #         includeRootFolder: true
+  #         displayName: iOS Mono Artifacts
+  #         artifactName: iOSMonoarm64
+  #         archiveExtension: '.tar.gz'
+  #         archiveType: tar
+  #         tarCompression: gz
 
   # build NativeAOT iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -109,7 +109,7 @@ jobs:
       buildConfig: release
       runtimeFlavor: mono
       platforms:
-      - ios-arm64
+      - ios_arm64
       jobParameters:
         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT

From 538a9e0887b1378b8997150a4c997462e54cb330 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 19:46:36 +0200
Subject: [PATCH 13/57] Update sample app params

---
 .../templates/build-perf-sample-apps.yml      | 84 +++++++++----------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index aeb6244d08c129..da6e1ffa46f21c 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -37,48 +37,48 @@ steps:
       displayName: clean bindir
     
   - ${{ if eq(parameters.osGroup, 'ios') }}:
-    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
-      env:
-        DevTeamProvisioning: '-'
-      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-      displayName: Build HelloiOS AOT sample app LLVM=False
-    - task: PublishBuildArtifacts@1
-      condition: succeededOrFailed()
-      displayName: 'Publish binlog'
-      inputs:
-        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
-        artifactName:  ${{ parameters.artifactName }}
-    - template: /eng/pipelines/common/upload-artifact-step.yml
-      parameters:
-        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
-        includeRootFolder: true
-        displayName: iOS Sample App NoLLVM
-        artifactName: iOSSampleAppNoLLVM
-        archiveExtension: '.zip'
-        archiveType: zip
-    - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
-      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-      displayName: Clean bindir
-    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
-      env:
-        DevTeamProvisioning: '-'
-      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-      displayName: Build HelloiOS AOT sample app LLVM=True
-    - task: PublishBuildArtifacts@1
-      condition: succeededOrFailed()
-      displayName: 'Publish binlog'
-      inputs:
-        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
-        artifactName:  ${{ parameters.artifactName }}
-    - template: /eng/pipelines/common/upload-artifact-step.yml
-      parameters:
-        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
-        includeRootFolder: true
-        displayName: iOS Sample App LLVM
-        artifactName: iOSSampleAppLLVM
-        archiveExtension: '.zip'
-        archiveType: zip
-    - script: make world TARGET_OS=ios MONO_ARCH=arm64 MONO_CONFIG=Release DEPLOY_AND_RUN=false
+    # - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
+    #   env:
+    #     DevTeamProvisioning: '-'
+    #   workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+    #   displayName: Build HelloiOS AOT sample app LLVM=False
+    # - task: PublishBuildArtifacts@1
+    #   condition: succeededOrFailed()
+    #   displayName: 'Publish binlog'
+    #   inputs:
+    #     pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+    #     artifactName:  ${{ parameters.artifactName }}
+    # - template: /eng/pipelines/common/upload-artifact-step.yml
+    #   parameters:
+    #     rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+    #     includeRootFolder: true
+    #     displayName: iOS Sample App NoLLVM
+    #     artifactName: iOSSampleAppNoLLVM
+    #     archiveExtension: '.zip'
+    #     archiveType: zip
+    # - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
+    #   workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+    #   displayName: Clean bindir
+    # - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
+    #   env:
+    #     DevTeamProvisioning: '-'
+    #   workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+    #   displayName: Build HelloiOS AOT sample app LLVM=True
+    # - task: PublishBuildArtifacts@1
+    #   condition: succeededOrFailed()
+    #   displayName: 'Publish binlog'
+    #   inputs:
+    #     pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+    #     artifactName:  ${{ parameters.artifactName }}
+    # - template: /eng/pipelines/common/upload-artifact-step.yml
+    #   parameters:
+    #     rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+    #     includeRootFolder: true
+    #     displayName: iOS Sample App LLVM
+    #     artifactName: iOSSampleAppLLVM
+    #     archiveExtension: '.zip'
+    #     archiveType: zip
+    - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'
       workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT

From 71b405f6011e050717fe59557a57731531889115 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 22:14:28 +0200
Subject: [PATCH 14/57] Update app bundle path

---
 eng/pipelines/coreclr/templates/build-perf-sample-apps.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index da6e1ffa46f21c..66d2bef4e118e1 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -91,7 +91,7 @@ steps:
         artifactName:  ${{ parameters.artifactName }}
     - template: /eng/pipelines/common/upload-artifact-step.yml
       parameters:
-        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
         includeRootFolder: true
         displayName: iOS Sample App
         artifactName: iOSSampleApp

From 2f109e7e9ceb86324123459c9e866dc6f39a876e Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 22:16:10 +0200
Subject: [PATCH 15/57] Enable Native AOT run scenario

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 9b1840af5e0414..e48ac6722ad15a 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -183,20 +183,20 @@ jobs:
   #       iOSLlvmBuild: True
 
   # run NativeAOT iOS scenarios scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSNativeAOT
-  #       projectFile: ios_nativeaot_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSNativeAOT
+        projectFile: ios_nativeaot_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
 
   # # run mono microbenchmarks perf job
   # - template: /eng/pipelines/common/platform-matrix.yml

From 8ed5c3fd2d2a8728cf5da0b523881870983c8774 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 22:16:14 +0200
Subject: [PATCH 16/57] Enable Native AOT run scenario

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index e48ac6722ad15a..aa3c0a557fad3c 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -182,7 +182,7 @@ jobs:
   #       logicalmachine: 'perfiphone12mini'
   #       iOSLlvmBuild: True
 
-  # run NativeAOT iOS scenarios scenarios
+  # run NativeAOT iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
     parameters:
       jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml

From 85afcbeeda5e5d03684fa44778008e55d9a88bdb Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 26 Apr 2023 23:43:49 +0200
Subject: [PATCH 17/57] Change runtime flavor to mono

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index aa3c0a557fad3c..e88882902a6e99 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -187,7 +187,7 @@ jobs:
     parameters:
       jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
       buildConfig: release
-      runtimeFlavor: coreclr
+      runtimeFlavor: mono
       platforms:
         - osx_x64
       jobParameters:

From 448fb521d2aee88ebc594a6ef8e4ed27cfa2b7e6 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 27 Apr 2023 11:35:12 +0200
Subject: [PATCH 18/57] Upgrade queue to osx.13.amd64.iphone.perf

---
 eng/testing/performance/performance-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index edca8697a7af64..e4bb9fff0d84bb 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -258,7 +258,7 @@ if [[ "$internal" == true ]]; then
     extra_benchmark_dotnet_arguments=
 
     if [[ "$logical_machine" == "perfiphone12mini" ]]; then
-        queue=OSX.1015.Amd64.Iphone.Perf
+        queue=OSX.13.Amd64.Iphone.Perf
     elif [[ "$logical_machine" == "perfampere" ]]; then
         queue=Ubuntu.2004.Arm64.Perf
     elif [[ "$logical_machine" == "cloudvm" ]]; then

From 31ff7de56ad4ae376b2292906ffcfd8f9c8d9261 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 27 Apr 2023 18:48:41 +0200
Subject: [PATCH 19/57] Update ios queue

---
 eng/testing/performance/performance-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index e4bb9fff0d84bb..4ed4825c5d9d70 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -258,7 +258,7 @@ if [[ "$internal" == true ]]; then
     extra_benchmark_dotnet_arguments=
 
     if [[ "$logical_machine" == "perfiphone12mini" ]]; then
-        queue=OSX.13.Amd64.Iphone.Perf
+        queue=OSX.1200.Amd64.Iphone
     elif [[ "$logical_machine" == "perfampere" ]]; then
         queue=Ubuntu.2004.Arm64.Perf
     elif [[ "$logical_machine" == "cloudvm" ]]; then

From e593c49441960634aa1e14594423a9a4e01ae6a6 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Fri, 28 Apr 2023 10:24:15 +0200
Subject: [PATCH 20/57] Update ios queue

---
 eng/testing/performance/performance-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 4ed4825c5d9d70..9dd47798680aa4 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -258,7 +258,7 @@ if [[ "$internal" == true ]]; then
     extra_benchmark_dotnet_arguments=
 
     if [[ "$logical_machine" == "perfiphone12mini" ]]; then
-        queue=OSX.1200.Amd64.Iphone
+        queue=OSX.1200.Amd64.Iphone.Open
     elif [[ "$logical_machine" == "perfampere" ]]; then
         queue=Ubuntu.2004.Arm64.Perf
     elif [[ "$logical_machine" == "cloudvm" ]]; then

From a1a20c2460af7f2181479864c9fab327262823fa Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Fri, 28 Apr 2023 11:57:29 +0200
Subject: [PATCH 21/57] Update ios queue

---
 eng/testing/performance/performance-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 9dd47798680aa4..edca8697a7af64 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -258,7 +258,7 @@ if [[ "$internal" == true ]]; then
     extra_benchmark_dotnet_arguments=
 
     if [[ "$logical_machine" == "perfiphone12mini" ]]; then
-        queue=OSX.1200.Amd64.Iphone.Open
+        queue=OSX.1015.Amd64.Iphone.Perf
     elif [[ "$logical_machine" == "perfampere" ]]; then
         queue=Ubuntu.2004.Arm64.Perf
     elif [[ "$logical_machine" == "cloudvm" ]]; then

From 734ec2a1c86a5684ff2255c701f991a864d6bd41 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 8 May 2023 13:49:49 +0200
Subject: [PATCH 22/57] Update sample path

---
 eng/pipelines/coreclr/templates/perf-job.yml | 4 ++--
 eng/testing/performance/performance-setup.sh | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index cf19b162a022c9..f7247e2eb90a5f 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -260,7 +260,7 @@ jobs:
     - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT') }}: 
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nativeaot
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleApp.zip'
           artifactName: 'iOSSampleApp'
@@ -271,7 +271,7 @@ jobs:
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nativeaot'
           artifactName: 'iOSSampleApp'
           checkDownloadedFiles: true
 
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index edca8697a7af64..997e0d02e8e045 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -422,8 +422,8 @@ if [[ "$iosmono" == "true" ]]; then
 fi
 
 if [[ "$iosnativeaot" == "true" ]]; then
-    mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld $payload_directory/iosHelloWorld
-    mkdir -p $payload_directory/iosHelloWorldZip && cp -rv $source_directory/iosHelloWorldZip $payload_directory/iosHelloWorldZip
+    mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nativeaot $payload_directory/iosHelloWorld
+    mkdir -p $payload_directory/iosHelloWorldZip/nativeaotzip && cp -rv $source_directory/iosHelloWorldZip/nativeaotzip $payload_directory/iosHelloWorldZip
 fi
 
 ci=true

From 26a294949338b05037a01069c4c0c54ea1052989 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 8 May 2023 15:40:29 +0200
Subject: [PATCH 23/57] Update urllib3 dependency

---
 eng/pipelines/coreclr/templates/run-performance-job.yml | 6 +++---
 eng/pipelines/coreclr/templates/run-scenarios-job.yml   | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index ac678053d91cf1..69368d6349ba43 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -71,7 +71,7 @@ jobs:
           ~/.jsvu/v8 -e "console.log(`V8 version: ${this.version()}`)"
     - ${{ if ne(parameters.runtimeType, 'wasm') }}:
       - HelixPreCommandsWasmOnLinux: echo
-    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.15;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3<2;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
     - HelixPreCommandStemLinux: >-
         export ORIGPYPATH=$PYTHONPATH
         export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;
@@ -82,7 +82,7 @@ jobs:
         ls -l $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate &&
         export PYTHONPATH= &&
         python3 -m pip install --user -U pip &&
-        pip3 install urllib3==1.26.15 &&
+        pip3 install urllib3<2 &&
         pip3 install --user azure.storage.blob==12.0.0 &&
         pip3 install --user azure.storage.queue==12.0.0 &&
         sudo apt-get update &&
@@ -91,7 +91,7 @@ jobs:
         export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
         || export PERF_PREREQS_INSTALL_FAILED=1;
         test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
-    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3<2;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
     - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
     - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
     - HelixPreCommand: ''
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index d7d6bc44f75370..ea30bfd6774c80 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -59,16 +59,16 @@ jobs:
       - SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
 
     - ${{ if eq(parameters.osGroup, 'windows') }}:
-      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.15 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3<2 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
       - HelixPostCommandsWindows: 'set PYTHONPATH=%ORIGPYPATH%'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), ne(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3<2 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsLinux: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), eq(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3<2 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsMusl: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if eq(parameters.osGroup, 'osx') }}:
-      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3<2 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandOSX: 'export PYTHONPATH=$ORIGPYPATH'
 
     # extra private job settings

From ce4ed652fcd83d8c594e0e17efba166d47c1ee3f Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 8 May 2023 21:40:58 +0200
Subject: [PATCH 24/57] Update Helix command path

---
 eng/testing/performance/ios_nativeaot_scenarios.proj | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eng/testing/performance/ios_nativeaot_scenarios.proj b/eng/testing/performance/ios_nativeaot_scenarios.proj
index 306929d06b13a1..af6654fda08989 100644
--- a/eng/testing/performance/ios_nativeaot_scenarios.proj
+++ b/eng/testing/performance/ios_nativeaot_scenarios.proj
@@ -23,15 +23,15 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT .app">
+    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT .app Size">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/ ./app;$(Python) pre.py --name app</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/nativeaot ./app;$(Python) pre.py --name app</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
     <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT Zip Size">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/iOSSampleApp/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/nativeaotzip/iOSSampleApp/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
@@ -44,7 +44,7 @@
           # PreCommands
           export XHARNESSPATH=$XHARNESS_CLI_PATH
 
-          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
+          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/nativeaot/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
           cp -f embedded.mobileprovision $(ScenarioDirectory)helloios/HelloiOS.app
           cd $(ScenarioDirectory)helloios
           sign HelloiOS.app

From 5ceda5867b58591da2f90269bd53c151206c88c8 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 8 May 2023 23:31:13 +0200
Subject: [PATCH 25/57] Update urllib3 version

---
 eng/pipelines/coreclr/templates/run-performance-job.yml | 6 +++---
 eng/pipelines/coreclr/templates/run-scenarios-job.yml   | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index 69368d6349ba43..a7e962bd84d9e4 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -71,7 +71,7 @@ jobs:
           ~/.jsvu/v8 -e "console.log(`V8 version: ${this.version()}`)"
     - ${{ if ne(parameters.runtimeType, 'wasm') }}:
       - HelixPreCommandsWasmOnLinux: echo
-    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3<2;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.6;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
     - HelixPreCommandStemLinux: >-
         export ORIGPYPATH=$PYTHONPATH
         export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;
@@ -82,7 +82,7 @@ jobs:
         ls -l $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate &&
         export PYTHONPATH= &&
         python3 -m pip install --user -U pip &&
-        pip3 install urllib3<2 &&
+        pip3 install urllib3==1.26.6 &&
         pip3 install --user azure.storage.blob==12.0.0 &&
         pip3 install --user azure.storage.queue==12.0.0 &&
         sudo apt-get update &&
@@ -91,7 +91,7 @@ jobs:
         export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
         || export PERF_PREREQS_INSTALL_FAILED=1;
         test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
-    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3<2;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
     - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
     - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
     - HelixPreCommand: ''
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index ea30bfd6774c80..4505b6e9ac3d7c 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -59,16 +59,16 @@ jobs:
       - SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
 
     - ${{ if eq(parameters.osGroup, 'windows') }}:
-      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3<2 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.6 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
       - HelixPostCommandsWindows: 'set PYTHONPATH=%ORIGPYPATH%'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), ne(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3<2 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsLinux: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), eq(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3<2 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsMusl: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if eq(parameters.osGroup, 'osx') }}:
-      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3<2 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandOSX: 'export PYTHONPATH=$ORIGPYPATH'
 
     # extra private job settings

From e2bf0eb1d0ca827f40edd96d9c6d88304ab1b10f Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 10 May 2023 10:51:14 +0200
Subject: [PATCH 26/57] revert urllib3 version

---
 eng/pipelines/coreclr/templates/run-performance-job.yml | 6 +++---
 eng/pipelines/coreclr/templates/run-scenarios-job.yml   | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index a7e962bd84d9e4..ac678053d91cf1 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -71,7 +71,7 @@ jobs:
           ~/.jsvu/v8 -e "console.log(`V8 version: ${this.version()}`)"
     - ${{ if ne(parameters.runtimeType, 'wasm') }}:
       - HelixPreCommandsWasmOnLinux: echo
-    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.6;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.15;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
     - HelixPreCommandStemLinux: >-
         export ORIGPYPATH=$PYTHONPATH
         export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;
@@ -82,7 +82,7 @@ jobs:
         ls -l $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate &&
         export PYTHONPATH= &&
         python3 -m pip install --user -U pip &&
-        pip3 install urllib3==1.26.6 &&
+        pip3 install urllib3==1.26.15 &&
         pip3 install --user azure.storage.blob==12.0.0 &&
         pip3 install --user azure.storage.queue==12.0.0 &&
         sudo apt-get update &&
@@ -91,7 +91,7 @@ jobs:
         export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
         || export PERF_PREREQS_INSTALL_FAILED=1;
         test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
-    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
     - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
     - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
     - HelixPreCommand: ''
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index 4505b6e9ac3d7c..d7d6bc44f75370 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -59,16 +59,16 @@ jobs:
       - SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
 
     - ${{ if eq(parameters.osGroup, 'windows') }}:
-      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.6 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.15 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
       - HelixPostCommandsWindows: 'set PYTHONPATH=%ORIGPYPATH%'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), ne(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsLinux: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), eq(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsMusl: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if eq(parameters.osGroup, 'osx') }}:
-      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandOSX: 'export PYTHONPATH=$ORIGPYPATH'
 
     # extra private job settings

From 4bd07c56a67fce127f0927ace69223687b4e7b89 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 10 May 2023 13:19:11 +0200
Subject: [PATCH 27/57] Update urllib3 version

---
 eng/pipelines/coreclr/templates/run-performance-job.yml | 6 +++---
 eng/pipelines/coreclr/templates/run-scenarios-job.yml   | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index ac678053d91cf1..a7e962bd84d9e4 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -71,7 +71,7 @@ jobs:
           ~/.jsvu/v8 -e "console.log(`V8 version: ${this.version()}`)"
     - ${{ if ne(parameters.runtimeType, 'wasm') }}:
       - HelixPreCommandsWasmOnLinux: echo
-    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.15;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.6;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
     - HelixPreCommandStemLinux: >-
         export ORIGPYPATH=$PYTHONPATH
         export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;
@@ -82,7 +82,7 @@ jobs:
         ls -l $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate &&
         export PYTHONPATH= &&
         python3 -m pip install --user -U pip &&
-        pip3 install urllib3==1.26.15 &&
+        pip3 install urllib3==1.26.6 &&
         pip3 install --user azure.storage.blob==12.0.0 &&
         pip3 install --user azure.storage.queue==12.0.0 &&
         sudo apt-get update &&
@@ -91,7 +91,7 @@ jobs:
         export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
         || export PERF_PREREQS_INSTALL_FAILED=1;
         test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
-    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
     - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
     - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
     - HelixPreCommand: ''
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index d7d6bc44f75370..4505b6e9ac3d7c 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -59,16 +59,16 @@ jobs:
       - SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
 
     - ${{ if eq(parameters.osGroup, 'windows') }}:
-      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.15 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.6 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
       - HelixPostCommandsWindows: 'set PYTHONPATH=%ORIGPYPATH%'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), ne(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsLinux: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), eq(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsMusl: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if eq(parameters.osGroup, 'osx') }}:
-      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandOSX: 'export PYTHONPATH=$ORIGPYPATH'
 
     # extra private job settings

From b73a522e3248b6335cd757785afc523af2770690 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 10 May 2023 17:03:49 +0200
Subject: [PATCH 28/57] Add instructions for running the runtime tests on iOS
 platforms

---
 docs/workflow/testing/libraries/testing-apple.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/workflow/testing/libraries/testing-apple.md b/docs/workflow/testing/libraries/testing-apple.md
index 2911e1649b9f9a..09e08d1b0cc178 100644
--- a/docs/workflow/testing/libraries/testing-apple.md
+++ b/docs/workflow/testing/libraries/testing-apple.md
@@ -89,6 +89,18 @@ A functional test can be run the same way as any library test suite, e.g.:
 
 Currently functional tests are expected to return `42` as a success code so please be careful when adding a new one.
 
+### Running the runtime tests
+
+Currently, only the `tracing/eventpipe` subset of runtime tests is enabled on iOS platforms.
+
+The subset of runtime tests can be built by executing the following shell script:
+```sh
+./build.sh -arch arm64 -os ios -s mono+libs -c Release
+./src/tests/build.sh os ios arm64 Release -mono tree tracing/eventpipe /p:LibrariesConfiguration=Release
+```
+
+The script generates an Apple bundle that can be executed using Xcode or XHarness.
+
 ### Viewing logs
 - see the logs generated by the XHarness tool
 - use the `Console` app on macOS:

From 9de48526e921f1a18e9093c69dee3ccdac2d00b1 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 10 May 2023 17:04:53 +0200
Subject: [PATCH 29/57] revert docs update

---
 docs/workflow/testing/libraries/testing-apple.md | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/docs/workflow/testing/libraries/testing-apple.md b/docs/workflow/testing/libraries/testing-apple.md
index 09e08d1b0cc178..2911e1649b9f9a 100644
--- a/docs/workflow/testing/libraries/testing-apple.md
+++ b/docs/workflow/testing/libraries/testing-apple.md
@@ -89,18 +89,6 @@ A functional test can be run the same way as any library test suite, e.g.:
 
 Currently functional tests are expected to return `42` as a success code so please be careful when adding a new one.
 
-### Running the runtime tests
-
-Currently, only the `tracing/eventpipe` subset of runtime tests is enabled on iOS platforms.
-
-The subset of runtime tests can be built by executing the following shell script:
-```sh
-./build.sh -arch arm64 -os ios -s mono+libs -c Release
-./src/tests/build.sh os ios arm64 Release -mono tree tracing/eventpipe /p:LibrariesConfiguration=Release
-```
-
-The script generates an Apple bundle that can be executed using Xcode or XHarness.
-
 ### Viewing logs
 - see the logs generated by the XHarness tool
 - use the `Console` app on macOS:

From b63ab0a3e89ac917c0765887279e7f21216b1127 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 11 May 2023 16:12:19 +0200
Subject: [PATCH 30/57] Update bundle .zip path

---
 eng/pipelines/coreclr/templates/perf-job.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index 607b63d06a9003..a7840025c3098a 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -276,7 +276,7 @@ jobs:
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nativeaot'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nativeaotzip'
           artifactName: 'iOSSampleApp'
           checkDownloadedFiles: true
 

From 7315bca4893631c69026203e0ef7eb5c239c79fa Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 11 May 2023 16:17:04 +0200
Subject: [PATCH 31/57] revert urllib3 version

---
 eng/pipelines/coreclr/templates/run-performance-job.yml | 6 +++---
 eng/pipelines/coreclr/templates/run-scenarios-job.yml   | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml
index a7e962bd84d9e4..ac678053d91cf1 100644
--- a/eng/pipelines/coreclr/templates/run-performance-job.yml
+++ b/eng/pipelines/coreclr/templates/run-performance-job.yml
@@ -71,7 +71,7 @@ jobs:
           ~/.jsvu/v8 -e "console.log(`V8 version: ${this.version()}`)"
     - ${{ if ne(parameters.runtimeType, 'wasm') }}:
       - HelixPreCommandsWasmOnLinux: echo
-    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.6;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -m pip install -U pip;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install urllib3==1.26.15;py -3 -m pip install azure.storage.blob==12.0.0;py -3 -m pip install azure.storage.queue==12.0.0;set "PERFLAB_UPLOAD_TOKEN=$(HelixPerfUploadTokenValue)"'
     - HelixPreCommandStemLinux: >-
         export ORIGPYPATH=$PYTHONPATH
         export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;
@@ -82,7 +82,7 @@ jobs:
         ls -l $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate &&
         export PYTHONPATH= &&
         python3 -m pip install --user -U pip &&
-        pip3 install urllib3==1.26.6 &&
+        pip3 install urllib3==1.26.15 &&
         pip3 install --user azure.storage.blob==12.0.0 &&
         pip3 install --user azure.storage.queue==12.0.0 &&
         sudo apt-get update &&
@@ -91,7 +91,7 @@ jobs:
         export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"
         || export PERF_PREREQS_INSTALL_FAILED=1;
         test "x$PERF_PREREQS_INSTALL_FAILED" = "x1" && echo "** Error: Failed to install prerequites **"
-    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
+    - HelixPreCommandStemMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib cargo;sudo apk add libgdiplus --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing; python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15;pip3 install azure.storage.blob==12.7.1;pip3 install azure.storage.queue==12.1.5;export PERFLAB_UPLOAD_TOKEN="$(HelixPerfUploadTokenValue)"'
     - ExtraMSBuildLogsWindows: 'set MSBUILDDEBUGCOMM=1;set "MSBUILDDEBUGPATH=%HELIX_WORKITEM_UPLOAD_ROOT%"'
     - ExtraMSBuildLogsLinux: 'export MSBUILDDEBUGCOMM=1;export "MSBUILDDEBUGPATH=$HELIX_WORKITEM_UPLOAD_ROOT"'
     - HelixPreCommand: ''
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index 4505b6e9ac3d7c..43ddd3ac4131c1 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -59,16 +59,16 @@ jobs:
       - SharedHelixPreCommands: 'chmod +x $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;. $HELIX_WORKITEM_PAYLOAD/machine-setup.sh;export PYTHONPATH=$HELIX_WORKITEM_PAYLOAD/scripts:$HELIX_WORKITEM_PAYLOAD'
 
     - ${{ if eq(parameters.osGroup, 'windows') }}:
-      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.6 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+      - HelixPreCommandWindows: 'set ORIGPYPATH=%PYTHONPATH%;py -3 -m venv %HELIX_WORKITEM_PAYLOAD%\.venv;call %HELIX_WORKITEM_PAYLOAD%\.venv\Scripts\activate.bat;set PYTHONPATH=;py -3 -m pip install -U pip;py -3 -m pip install --user urllib3==1.26.15 --force-reinstall;py -3 -m pip install --user azure.storage.blob==12.0.0 --force-reinstall;py -3 -m pip install --user azure.storage.queue==12.0.0 --force-reinstall;set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
       - HelixPostCommandsWindows: 'set PYTHONPATH=%ORIGPYPATH%'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), ne(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandLinux: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;sudo apt-get -y install python3-venv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15--force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsLinux: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.osGroup, 'osx'), eq(parameters.osSubGroup, '_musl')) }}:
-      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.6 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandMusl: 'export ORIGPYPATH=$PYTHONPATH;sudo apk add py3-virtualenv;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install --user urllib3==1.26.15 --force-reinstall;pip3 install --user azure.storage.blob==12.0.0 --force-reinstall;pip3 install --user azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandsMusl: 'export PYTHONPATH=$ORIGPYPATH'
     - ${{ if eq(parameters.osGroup, 'osx') }}:
-      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.6 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+      - HelixPreCommandOSX: 'export ORIGPYPATH=$PYTHONPATH;export CRYPTOGRAPHY_ALLOW_OPENSSL_102=true;python3 -m venv $HELIX_WORKITEM_PAYLOAD/.venv;source $HELIX_WORKITEM_PAYLOAD/.venv/bin/activate;export PYTHONPATH=;python3 -m pip install -U pip;pip3 install urllib3==1.26.15 --force-reinstall;pip3 install azure.storage.blob==12.0.0 --force-reinstall;pip3 install azure.storage.queue==12.0.0 --force-reinstall;export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
       - HelixPostCommandOSX: 'export PYTHONPATH=$ORIGPYPATH'
 
     # extra private job settings

From 9f1099ebbed1fcc2fe1449775f6e8605cf0d6300 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 11 May 2023 16:21:26 +0200
Subject: [PATCH 32/57] Disable non-ios jobs

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 140 +++++++++----------
 1 file changed, 70 insertions(+), 70 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 52bb32554e6ca3..5c62ba6ddc5d4c 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -303,37 +303,37 @@ jobs:
   #       logicalmachine: 'perftiger'
   #       pgoRunType: -DynamicPgo
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: microbenchmarks.proj
-        runKind: micro
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
-        pgoRunType: --dynamicpgo
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
+  #       pgoRunType: --dynamicpgo
 
-  - 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'
-        pgoRunType: -FullPgo
+  # - 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'
+  #       pgoRunType: -FullPgo
 
   # # run coreclr perfowl microbenchmarks perf job
   # - template: /eng/pipelines/common/platform-matrix.yml
@@ -370,44 +370,44 @@ jobs:
   #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
   #       logicalmachine: 'perftiger'
 
-  # build mono runtime packs
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - android_arm64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: Mono_Packs
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
-        extraStepsParameters:
-          name: MonoRuntimePacks
+  # # build mono runtime packs
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - android_arm64
+  #     jobParameters:
+  #       buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+  #       nameSuffix: Mono_Packs
+  #       isOfficialBuild: false
+  #       extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
+  #       extraStepsParameters:
+  #         name: MonoRuntimePacks
 
-  # build PerfBDN app
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - ios_arm64
-      jobParameters:
-        dependsOn:
-         - Build_android_arm64_release_Mono_Packs
-        buildArgs: -s mono -c $(_BuildConfig)
-        nameSuffix: PerfBDNApp
-        isOfficialBuild: false
-        pool:
-          vmImage: 'macos-12'
-        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: Android BDN App Artifacts
-          artifactName: PerfBDNAppArm
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+  # # build PerfBDN app
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - ios_arm64
+  #     jobParameters:
+  #       dependsOn:
+  #        - Build_android_arm64_release_Mono_Packs
+  #       buildArgs: -s mono -c $(_BuildConfig)
+  #       nameSuffix: PerfBDNApp
+  #       isOfficialBuild: false
+  #       pool:
+  #         vmImage: 'macos-12'
+  #       extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
+  #       extraStepsParameters:
+  #         rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+  #         includeRootFolder: true
+  #         displayName: Android BDN App Artifacts
+  #         artifactName: PerfBDNAppArm
+  #         archiveExtension: '.tar.gz'
+  #         archiveType: tar
+  #         tarCompression: gz

From 84e22a1d8a0c62892d06189b684969050ed94124 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 11 May 2023 19:02:01 +0200
Subject: [PATCH 33/57] Fix performance-setup.sh typo

---
 eng/testing/performance/performance-setup.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 640c1e037cbb66..5073a0681256bb 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -342,6 +342,7 @@ fi
 if [[ "$iosnativeaot" == "true" ]]; then
     configurations="$configurations"
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
+fi
 
 if [[ "$nopgo" == "true" ]]; then
     configurations="$configurations PGOType=nopgo"

From 3c00aeabe2992597a4dbb68b7de3cf0d9e3eb300 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Fri, 12 May 2023 11:23:41 +0200
Subject: [PATCH 34/57] Strip debug symbols

---
 src/mono/sample/iOS-NativeAOT/Makefile | 2 +-
 src/mono/sample/iOS/Makefile           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mono/sample/iOS-NativeAOT/Makefile b/src/mono/sample/iOS-NativeAOT/Makefile
index e1e295a75d9e71..601c2cbe60c120 100644
--- a/src/mono/sample/iOS-NativeAOT/Makefile
+++ b/src/mono/sample/iOS-NativeAOT/Makefile
@@ -6,7 +6,7 @@ BUILD_CONFIG?=Debug
 TARGET_ARCH?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${arch})
 TARGET_OS?=iossimulator
 DEPLOY_AND_RUN?=false
-STRIP_DEBUG_SYMBOLS?=false
+STRIP_DEBUG_SYMBOLS?=true
 
 REPO_DIR=$(realpath $(TOP))
 TASKS_DIR=$(REPO_DIR)/src/tasks
diff --git a/src/mono/sample/iOS/Makefile b/src/mono/sample/iOS/Makefile
index ef24938c6fd304..44953d242aa43c 100644
--- a/src/mono/sample/iOS/Makefile
+++ b/src/mono/sample/iOS/Makefile
@@ -6,7 +6,7 @@ AOT?=false
 TARGET?=iossimulator
 DEPLOY_AND_RUN?=true
 APP_SANDBOX?=false
-STRIP_DEBUG_SYMBOLS?=false # only used when measuring SOD via build-appbundle make target
+STRIP_DEBUG_SYMBOLS?=true # only used when measuring SOD via build-appbundle make target
 
 #If DIAGNOSTIC_PORTS is enabled, RUNTIME_COMPONENTS must also be enabled.
 #If RUNTIME_COMPONENTS is enabled, DIAGNOSTIC_PORTS is optional.

From 076711a69b52d2e2c31cc11c4219e9374b087efb Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Fri, 19 May 2023 13:14:00 +0200
Subject: [PATCH 35/57] Update queue and build command

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 1 -
 eng/testing/performance/performance-setup.sh | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 5c62ba6ddc5d4c..ce0a7398d3c978 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -111,7 +111,6 @@ jobs:
       platforms:
       - ios_arm64
       jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
         nameSuffix: iOSNativeAOT
         isOfficialBuild: false
         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 5073a0681256bb..37973b384ac00a 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -273,7 +273,7 @@ if [[ "$internal" == true ]]; then
     extra_benchmark_dotnet_arguments=
 
     if [[ "$logical_machine" == "perfiphone12mini" ]]; then
-        queue=OSX.1015.Amd64.Iphone.Perf
+        queue=OSX.13.Amd64.Iphone.Perf
     elif [[ "$logical_machine" == "perfampere" ]]; then
         queue=Ubuntu.2004.Arm64.Perf
     elif [[ "$logical_machine" == "cloudvm" ]]; then

From dd2a41435a5ae33e3705fded57c59472cd359087 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 23 May 2023 09:26:56 +0200
Subject: [PATCH 36/57] Revert performance queue

---
 eng/testing/performance/performance-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 37973b384ac00a..5073a0681256bb 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -273,7 +273,7 @@ if [[ "$internal" == true ]]; then
     extra_benchmark_dotnet_arguments=
 
     if [[ "$logical_machine" == "perfiphone12mini" ]]; then
-        queue=OSX.13.Amd64.Iphone.Perf
+        queue=OSX.1015.Amd64.Iphone.Perf
     elif [[ "$logical_machine" == "perfampere" ]]; then
         queue=Ubuntu.2004.Arm64.Perf
     elif [[ "$logical_machine" == "cloudvm" ]]; then

From 8c07865290dc155e6294ccab013717c98e120438 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 23 May 2023 09:41:28 +0200
Subject: [PATCH 37/57] Revert temporary changes

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml  | 700 +++++++++---------
 eng/pipelines/coreclr/perf.yml                |  14 +-
 .../templates/build-perf-sample-apps.yml      |  82 +-
 3 files changed, 398 insertions(+), 398 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index ce0a7398d3c978..4fd71290184809 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -1,106 +1,106 @@
 jobs:
 
-# - ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+- ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
 
-#   # build mono
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-#       runtimeFlavor: mono
-#       buildConfig: release
-#       platforms:
-#       - linux_x64
+  # build mono
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+      runtimeFlavor: mono
+      buildConfig: release
+      platforms:
+      - linux_x64
 
-#   # build coreclr and libraries
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-#       buildConfig: release
-#       platforms:
-#       - linux_x64
-#       jobParameters:
-#         testGroup: perf
+  # build coreclr and libraries
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+      buildConfig: release
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
 
-# - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
 
-#   # build coreclr and libraries
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-#       buildConfig: release
-#       platforms:
-#       - linux_x64
-#       - windows_x64
-#       - windows_x86
-#       - linux_musl_x64
-#       jobParameters:
-#         testGroup: perf
+  # build coreclr and libraries
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+      buildConfig: release
+      platforms:
+      - linux_x64
+      - windows_x64
+      - windows_x86
+      - linux_musl_x64
+      jobParameters:
+        testGroup: perf
 
-#   # build mono for AOT
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/global-build-job.yml
-#       buildConfig: release
-#       runtimeFlavor: mono
-#       platforms:
-#       - linux_x64
-#       jobParameters:
-#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-#         nameSuffix: AOT
-#         isOfficialBuild: false
-#         extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
-#         extraStepsParameters:
-#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-#           includeRootFolder: true
-#           displayName: AOT Mono Artifacts
-#           artifactName: LinuxMonoAOTx64
-#           archiveExtension: '.tar.gz'
-#           archiveType: tar
-#           tarCompression: gz
+  # build mono for AOT
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - linux_x64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: AOT
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: AOT Mono Artifacts
+          artifactName: LinuxMonoAOTx64
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
 
-#   # build mono Android scenarios
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/global-build-job.yml
-#       buildConfig: release
-#       runtimeFlavor: mono
-#       platforms:
-#       - android_arm64
-#       jobParameters:
-#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-#         nameSuffix: AndroidMono
-#         isOfficialBuild: false
-#         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-#         extraStepsParameters:
-#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-#           includeRootFolder: true
-#           displayName: Android Mono Artifacts
-#           artifactName: AndroidMonoarm64
-#           archiveExtension: '.tar.gz'
-#           archiveType: tar
-#           tarCompression: gz
+  # build mono Android scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - android_arm64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: AndroidMono
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: Android Mono Artifacts
+          artifactName: AndroidMonoarm64
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
 
-  # build mono iOS scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - ios_arm64
-  #     jobParameters:
-  #       buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-  #       nameSuffix: iOSMono
-  #       isOfficialBuild: false
-  #       extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-  #       extraStepsParameters:
-  #         rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-  #         includeRootFolder: true
-  #         displayName: iOS Mono Artifacts
-  #         artifactName: iOSMonoarm64
-  #         archiveExtension: '.tar.gz'
-  #         archiveType: tar
-  #         tarCompression: gz
+  build mono iOS scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - ios_arm64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: iOSMono
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: iOS Mono Artifacts
+          artifactName: iOSMonoarm64
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
 
   # build NativeAOT iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -123,63 +123,63 @@ jobs:
           archiveType: tar
           tarCompression: gz
 
-  # # build mono
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-  #     runtimeFlavor: mono
-  #     buildConfig: release
-  #     platforms:
-  #     - linux_x64
+  # build mono
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+      runtimeFlavor: mono
+      buildConfig: release
+      platforms:
+      - linux_x64
 
-  # # run android scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - windows_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: AndroidMono
-  #       projectFile: android_scenarios.proj
-  #       runKind: android_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfpixel4a'
+  # run android scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - windows_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: AndroidMono
+        projectFile: android_scenarios.proj
+        runKind: android_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfpixel4a'
 
-  # # run mono iOS scenarios scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSMono
-  #       projectFile: ios_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSLlvmBuild: False
+  # run mono iOS scenarios scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: False
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSMono
-  #       projectFile: ios_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSLlvmBuild: True
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: True
 
   # run NativeAOT iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -197,216 +197,216 @@ jobs:
         runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
         logicalmachine: 'perfiphone12mini'
 
-  # # run mono microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       runtimeType: mono
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro_mono
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run mono microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        runtimeType: mono
+        projectFile: microbenchmarks.proj
+        runKind: micro_mono
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run mono interpreter perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       runtimeType: mono
-  #       codeGenType: 'Interpreter'
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro_mono
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run mono interpreter perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        runtimeType: mono
+        codeGenType: 'Interpreter'
+        projectFile: microbenchmarks.proj
+        runKind: micro_mono
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run mono aot microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
-  #     buildConfig: release
-  #     runtimeFlavor: aot
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       runtimeType: mono
-  #       codeGenType: 'AOT'
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro_mono
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run mono aot microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
+      buildConfig: release
+      runtimeFlavor: aot
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        runtimeType: mono
+        codeGenType: 'AOT'
+        projectFile: microbenchmarks.proj
+        runKind: micro_mono
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run coreclr perftiger microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     - windows_x64
-  #     - windows_x86
-  #     - linux_musl_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run coreclr perftiger microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      - windows_x64
+      - windows_x86
+      - linux_musl_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run coreclr perftiger microbenchmarks pgo 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'
-  #       pgoRunType: -NoPgo
+  # run coreclr perftiger microbenchmarks pgo 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'
+        pgoRunType: -NoPgo
 
-  # - 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'
-  #       pgoRunType: -DynamicPgo
+  - 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'
+        pgoRunType: -DynamicPgo
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
-  #       pgoRunType: --dynamicpgo
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
+        pgoRunType: --dynamicpgo
 
-  # - 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'
-  #       pgoRunType: -FullPgo
+  - 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'
+        pgoRunType: -FullPgo
 
-  # # run coreclr perfowl microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     - windows_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perfowl'
+  # run coreclr perfowl microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      - windows_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perfowl'
 
-  # # run coreclr crossgen perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     - windows_x64
-  #     - windows_x86
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: crossgen_perf.proj
-  #       runKind: crossgen_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perftiger'
+  # run coreclr crossgen perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      - windows_x64
+      - windows_x86
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: crossgen_perf.proj
+        runKind: crossgen_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perftiger'
 
-  # # build mono runtime packs
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - android_arm64
-  #     jobParameters:
-  #       buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-  #       nameSuffix: Mono_Packs
-  #       isOfficialBuild: false
-  #       extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
-  #       extraStepsParameters:
-  #         name: MonoRuntimePacks
+  # build mono runtime packs
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - android_arm64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: Mono_Packs
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
+        extraStepsParameters:
+          name: MonoRuntimePacks
 
-  # # build PerfBDN app
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - ios_arm64
-  #     jobParameters:
-  #       dependsOn:
-  #        - Build_android_arm64_release_Mono_Packs
-  #       buildArgs: -s mono -c $(_BuildConfig)
-  #       nameSuffix: PerfBDNApp
-  #       isOfficialBuild: false
-  #       pool:
-  #         vmImage: 'macos-12'
-  #       extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
-  #       extraStepsParameters:
-  #         rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-  #         includeRootFolder: true
-  #         displayName: Android BDN App Artifacts
-  #         artifactName: PerfBDNAppArm
-  #         archiveExtension: '.tar.gz'
-  #         archiveType: tar
-  #         tarCompression: gz
+  # build PerfBDN app
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - ios_arm64
+      jobParameters:
+        dependsOn:
+         - Build_android_arm64_release_Mono_Packs
+        buildArgs: -s mono -c $(_BuildConfig)
+        nameSuffix: PerfBDNApp
+        isOfficialBuild: false
+        pool:
+          vmImage: 'macos-12'
+        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: Android BDN App Artifacts
+          artifactName: PerfBDNAppArm
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index 04e90898d76f75..ae734cbfdaa76d 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -42,12 +42,12 @@ extends:
     - stage: Build
       jobs:
 
-      # - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
-      #   parameters:
-      #     collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
-      #     ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
-      #       runProfile: 'non-v8'
-      #     ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
-      #       runProfile: 'v8'
+      - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
+        parameters:
+          collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
+          ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+            runProfile: 'non-v8'
+          ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+            runProfile: 'v8'
 
       - template: /eng/pipelines/coreclr/perf-non-wasm-jobs.yml
diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index 66d2bef4e118e1..8f25d28effdda7 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -37,47 +37,47 @@ steps:
       displayName: clean bindir
     
   - ${{ if eq(parameters.osGroup, 'ios') }}:
-    # - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
-    #   env:
-    #     DevTeamProvisioning: '-'
-    #   workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-    #   displayName: Build HelloiOS AOT sample app LLVM=False
-    # - task: PublishBuildArtifacts@1
-    #   condition: succeededOrFailed()
-    #   displayName: 'Publish binlog'
-    #   inputs:
-    #     pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
-    #     artifactName:  ${{ parameters.artifactName }}
-    # - template: /eng/pipelines/common/upload-artifact-step.yml
-    #   parameters:
-    #     rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
-    #     includeRootFolder: true
-    #     displayName: iOS Sample App NoLLVM
-    #     artifactName: iOSSampleAppNoLLVM
-    #     archiveExtension: '.zip'
-    #     archiveType: zip
-    # - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
-    #   workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-    #   displayName: Clean bindir
-    # - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
-    #   env:
-    #     DevTeamProvisioning: '-'
-    #   workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-    #   displayName: Build HelloiOS AOT sample app LLVM=True
-    # - task: PublishBuildArtifacts@1
-    #   condition: succeededOrFailed()
-    #   displayName: 'Publish binlog'
-    #   inputs:
-    #     pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
-    #     artifactName:  ${{ parameters.artifactName }}
-    # - template: /eng/pipelines/common/upload-artifact-step.yml
-    #   parameters:
-    #     rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
-    #     includeRootFolder: true
-    #     displayName: iOS Sample App LLVM
-    #     artifactName: iOSSampleAppLLVM
-    #     archiveExtension: '.zip'
-    #     archiveType: zip
+    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
+      env:
+        DevTeamProvisioning: '-'
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Build HelloiOS AOT sample app LLVM=False
+    - task: PublishBuildArtifacts@1
+      condition: succeededOrFailed()
+      displayName: 'Publish binlog'
+      inputs:
+        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+        artifactName:  ${{ parameters.artifactName }}
+    - template: /eng/pipelines/common/upload-artifact-step.yml
+      parameters:
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        includeRootFolder: true
+        displayName: iOS Sample App NoLLVM
+        artifactName: iOSSampleAppNoLLVM
+        archiveExtension: '.zip'
+        archiveType: zip
+    - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Clean bindir
+    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
+      env:
+        DevTeamProvisioning: '-'
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Build HelloiOS AOT sample app LLVM=True
+    - task: PublishBuildArtifacts@1
+      condition: succeededOrFailed()
+      displayName: 'Publish binlog'
+      inputs:
+        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+        artifactName:  ${{ parameters.artifactName }}
+    - template: /eng/pipelines/common/upload-artifact-step.yml
+      parameters:
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        includeRootFolder: true
+        displayName: iOS Sample App LLVM
+        artifactName: iOSSampleAppLLVM
+        archiveExtension: '.zip'
+        archiveType: zip
     - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'

From 24fe6d31c910cdc406c075f74a6dd887baa06ca5 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 23 May 2023 09:42:22 +0200
Subject: [PATCH 38/57] Add comment

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 4fd71290184809..5a856ee2a22c71 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -80,7 +80,7 @@ jobs:
           archiveType: tar
           tarCompression: gz
 
-  build mono iOS scenarios
+  # build mono iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
     parameters:
       jobTemplate: /eng/pipelines/common/global-build-job.yml

From 4975df10cfd482aef3de8f25488bd3f9e7b5522d Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 23 May 2023 09:48:44 +0200
Subject: [PATCH 39/57] Add tracking issue

---
 src/mono/sample/iOS-NativeAOT/Program.csproj | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mono/sample/iOS-NativeAOT/Program.csproj b/src/mono/sample/iOS-NativeAOT/Program.csproj
index 958d47737654f5..c76b6530d811d3 100644
--- a/src/mono/sample/iOS-NativeAOT/Program.csproj
+++ b/src/mono/sample/iOS-NativeAOT/Program.csproj
@@ -29,7 +29,7 @@
     <DevTeamProvisioning Condition="'$(DevTeamProvisioning)' == ''">adhoc</DevTeamProvisioning>
     <EnableAppSandbox Condition="'$(EnableAppSandbox)' == ''">false</EnableAppSandbox>
   </PropertyGroup>
-  <!-- Fix temporary regression, will be fixed on the main in a separate PR -->
+  <!-- Fix temporary regression, will be fixed on the main in a separate PR: https://github.com/dotnet/runtime/issues/80911 -->
   <Import Project="$(CoreClrProjectRoot)nativeaot\BuildIntegration\Microsoft.DotNet.ILCompiler.SingleEntry.targets" />
   <UsingTask TaskName="AppleAppBuilderTask"
              AssemblyFile="$(AppleAppBuilderTasksAssemblyPath)" />

From b158ce9d16dc9c9543790fb8da210a81312ccfe8 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 23 May 2023 16:17:30 +0200
Subject: [PATCH 40/57] Add conditional build steps for iOSMono and
 iOSNativeAOT configurations

---
 eng/pipelines/coreclr/templates/build-perf-sample-apps.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index 8f25d28effdda7..f202ab1efa23b9 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -35,8 +35,8 @@ steps:
     - script: rm -r -f $(Build.SourcesDirectory)/artifacts/bin/AndroidSampleApp
       workingDirectory: $(Build.SourcesDirectory)/artifacts/bin
       displayName: clean bindir
-    
-  - ${{ if eq(parameters.osGroup, 'ios') }}:
+
+  - ${{ if and(eq(parameters.osGroup, 'ios'), eq(nameSuffix, 'iOSMono')) }}:
     - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'
@@ -78,6 +78,8 @@ steps:
         artifactName: iOSSampleAppLLVM
         archiveExtension: '.zip'
         archiveType: zip
+
+  - ${{ if and(eq(parameters.osGroup, 'ios'), eq(nameSuffix, 'iOSNativeAOT')) }}:
     - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'

From 6dd5f001bad9deb2b0adcfe1cecc26d1c9e9e86f Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 23 May 2023 16:19:11 +0200
Subject: [PATCH 41/57] Add missing parameter object

---
 eng/pipelines/coreclr/templates/build-perf-sample-apps.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index f202ab1efa23b9..90c9fc2cfd5179 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -36,7 +36,7 @@ steps:
       workingDirectory: $(Build.SourcesDirectory)/artifacts/bin
       displayName: clean bindir
 
-  - ${{ if and(eq(parameters.osGroup, 'ios'), eq(nameSuffix, 'iOSMono')) }}:
+  - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSMono')) }}:
     - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'
@@ -79,7 +79,7 @@ steps:
         archiveExtension: '.zip'
         archiveType: zip
 
-  - ${{ if and(eq(parameters.osGroup, 'ios'), eq(nameSuffix, 'iOSNativeAOT')) }}:
+  - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSNativeAOT')) }}:
     - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false
       env:
         DevTeamProvisioning: '-'

From e5c0b9884976b8a738cedd73e1b80bbb77e5dc7f Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Wed, 24 May 2023 18:05:32 +0200
Subject: [PATCH 42/57] Disable other jobs

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 594 +++++++++----------
 eng/pipelines/coreclr/perf.yml               |  14 +-
 2 files changed, 304 insertions(+), 304 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 5a856ee2a22c71..67059abc768308 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -2,83 +2,83 @@ jobs:
 
 - ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
 
-  # build mono
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-      runtimeFlavor: mono
-      buildConfig: release
-      platforms:
-      - linux_x64
+#   # build mono
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+#       runtimeFlavor: mono
+#       buildConfig: release
+#       platforms:
+#       - linux_x64
 
-  # build coreclr and libraries
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-      buildConfig: release
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
+#   # build coreclr and libraries
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+#       buildConfig: release
+#       platforms:
+#       - linux_x64
+#       jobParameters:
+#         testGroup: perf
 
-- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+# - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
 
-  # build coreclr and libraries
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-      buildConfig: release
-      platforms:
-      - linux_x64
-      - windows_x64
-      - windows_x86
-      - linux_musl_x64
-      jobParameters:
-        testGroup: perf
+#   # build coreclr and libraries
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+#       buildConfig: release
+#       platforms:
+#       - linux_x64
+#       - windows_x64
+#       - windows_x86
+#       - linux_musl_x64
+#       jobParameters:
+#         testGroup: perf
 
-  # build mono for AOT
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - linux_x64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: AOT
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: AOT Mono Artifacts
-          artifactName: LinuxMonoAOTx64
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+#   # build mono for AOT
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/global-build-job.yml
+#       buildConfig: release
+#       runtimeFlavor: mono
+#       platforms:
+#       - linux_x64
+#       jobParameters:
+#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+#         nameSuffix: AOT
+#         isOfficialBuild: false
+#         extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
+#         extraStepsParameters:
+#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+#           includeRootFolder: true
+#           displayName: AOT Mono Artifacts
+#           artifactName: LinuxMonoAOTx64
+#           archiveExtension: '.tar.gz'
+#           archiveType: tar
+#           tarCompression: gz
 
-  # build mono Android scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - android_arm64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: AndroidMono
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: Android Mono Artifacts
-          artifactName: AndroidMonoarm64
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+#   # build mono Android scenarios
+#   - template: /eng/pipelines/common/platform-matrix.yml
+#     parameters:
+#       jobTemplate: /eng/pipelines/common/global-build-job.yml
+#       buildConfig: release
+#       runtimeFlavor: mono
+#       platforms:
+#       - android_arm64
+#       jobParameters:
+#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+#         nameSuffix: AndroidMono
+#         isOfficialBuild: false
+#         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+#         extraStepsParameters:
+#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+#           includeRootFolder: true
+#           displayName: Android Mono Artifacts
+#           artifactName: AndroidMonoarm64
+#           archiveExtension: '.tar.gz'
+#           archiveType: tar
+#           tarCompression: gz
 
   # build mono iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -123,30 +123,30 @@ jobs:
           archiveType: tar
           tarCompression: gz
 
-  # build mono
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-      runtimeFlavor: mono
-      buildConfig: release
-      platforms:
-      - linux_x64
+  # # build mono
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+  #     runtimeFlavor: mono
+  #     buildConfig: release
+  #     platforms:
+  #     - linux_x64
 
-  # run android scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - windows_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: AndroidMono
-        projectFile: android_scenarios.proj
-        runKind: android_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfpixel4a'
+  # # run android scenarios
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - windows_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: AndroidMono
+  #       projectFile: android_scenarios.proj
+  #       runKind: android_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfpixel4a'
 
   # run mono iOS scenarios scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -197,216 +197,216 @@ jobs:
         runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
         logicalmachine: 'perfiphone12mini'
 
-  # run mono microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        runtimeType: mono
-        projectFile: microbenchmarks.proj
-        runKind: micro_mono
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run mono microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       runtimeType: mono
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro_mono
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run mono interpreter perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        runtimeType: mono
-        codeGenType: 'Interpreter'
-        projectFile: microbenchmarks.proj
-        runKind: micro_mono
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run mono interpreter perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       runtimeType: mono
+  #       codeGenType: 'Interpreter'
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro_mono
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run mono aot microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
-      buildConfig: release
-      runtimeFlavor: aot
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        runtimeType: mono
-        codeGenType: 'AOT'
-        projectFile: microbenchmarks.proj
-        runKind: micro_mono
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run mono aot microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
+  #     buildConfig: release
+  #     runtimeFlavor: aot
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       runtimeType: mono
+  #       codeGenType: 'AOT'
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro_mono
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run coreclr perftiger microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      - windows_x64
-      - windows_x86
-      - linux_musl_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: microbenchmarks.proj
-        runKind: micro
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
+  # # run coreclr perftiger microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     - windows_x64
+  #     - windows_x86
+  #     - linux_musl_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # run coreclr perftiger microbenchmarks pgo 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'
-        pgoRunType: -NoPgo
+  # # run coreclr perftiger microbenchmarks pgo 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'
+  #       pgoRunType: -NoPgo
 
-  - 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'
-        pgoRunType: -DynamicPgo
+  # - 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'
+  #       pgoRunType: -DynamicPgo
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: microbenchmarks.proj
-        runKind: micro
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perftiger'
-        pgoRunType: --dynamicpgo
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perftiger'
+  #       pgoRunType: --dynamicpgo
 
-  - 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'
-        pgoRunType: -FullPgo
+  # - 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'
+  #       pgoRunType: -FullPgo
 
-  # run coreclr perfowl microbenchmarks perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      - windows_x64
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: microbenchmarks.proj
-        runKind: micro
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-        logicalmachine: 'perfowl'
+  # # run coreclr perfowl microbenchmarks perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     - windows_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: microbenchmarks.proj
+  #       runKind: micro
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+  #       logicalmachine: 'perfowl'
 
-  # run coreclr crossgen perf job
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: coreclr
-      platforms:
-      - linux_x64
-      - windows_x64
-      - windows_x86
-      jobParameters:
-        testGroup: perf
-        liveLibrariesBuildConfig: Release
-        projectFile: crossgen_perf.proj
-        runKind: crossgen_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perftiger'
+  # # run coreclr crossgen perf job
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: coreclr
+  #     platforms:
+  #     - linux_x64
+  #     - windows_x64
+  #     - windows_x86
+  #     jobParameters:
+  #       testGroup: perf
+  #       liveLibrariesBuildConfig: Release
+  #       projectFile: crossgen_perf.proj
+  #       runKind: crossgen_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perftiger'
 
-  # build mono runtime packs
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - android_arm64
-      jobParameters:
-        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-        nameSuffix: Mono_Packs
-        isOfficialBuild: false
-        extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
-        extraStepsParameters:
-          name: MonoRuntimePacks
+  # # build mono runtime packs
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - android_arm64
+  #     jobParameters:
+  #       buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+  #       nameSuffix: Mono_Packs
+  #       isOfficialBuild: false
+  #       extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
+  #       extraStepsParameters:
+  #         name: MonoRuntimePacks
 
-  # build PerfBDN app
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/common/global-build-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-      - ios_arm64
-      jobParameters:
-        dependsOn:
-         - Build_android_arm64_release_Mono_Packs
-        buildArgs: -s mono -c $(_BuildConfig)
-        nameSuffix: PerfBDNApp
-        isOfficialBuild: false
-        pool:
-          vmImage: 'macos-12'
-        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
-        extraStepsParameters:
-          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-          includeRootFolder: true
-          displayName: Android BDN App Artifacts
-          artifactName: PerfBDNAppArm
-          archiveExtension: '.tar.gz'
-          archiveType: tar
-          tarCompression: gz
+  # # build PerfBDN app
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #     - ios_arm64
+  #     jobParameters:
+  #       dependsOn:
+  #        - Build_android_arm64_release_Mono_Packs
+  #       buildArgs: -s mono -c $(_BuildConfig)
+  #       nameSuffix: PerfBDNApp
+  #       isOfficialBuild: false
+  #       pool:
+  #         vmImage: 'macos-12'
+  #       extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
+  #       extraStepsParameters:
+  #         rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+  #         includeRootFolder: true
+  #         displayName: Android BDN App Artifacts
+  #         artifactName: PerfBDNAppArm
+  #         archiveExtension: '.tar.gz'
+  #         archiveType: tar
+  #         tarCompression: gz
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index ae734cbfdaa76d..04e90898d76f75 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -42,12 +42,12 @@ extends:
     - stage: Build
       jobs:
 
-      - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
-        parameters:
-          collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
-          ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
-            runProfile: 'non-v8'
-          ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
-            runProfile: 'v8'
+      # - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
+      #   parameters:
+      #     collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
+      #     ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+      #       runProfile: 'non-v8'
+      #     ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+      #       runProfile: 'v8'
 
       - template: /eng/pipelines/coreclr/perf-non-wasm-jobs.yml

From f3a18239ca580df509292cc1cd63dd56c453c8e5 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 25 May 2023 13:55:00 +0200
Subject: [PATCH 43/57] Add STRIP_SYMBOLS parameter to the perf measurements

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml  | 53 +++++++++++++
 .../templates/build-perf-sample-apps.yml      | 78 +++++++++++++++++--
 eng/pipelines/coreclr/templates/perf-job.yml  | 72 ++++++++++++++---
 .../coreclr/templates/run-scenarios-job.yml   |  2 +-
 .../performance/ios_nativeaot_scenarios.proj  | 18 +++--
 eng/testing/performance/ios_scenarios.proj    | 15 ++--
 eng/testing/performance/performance-setup.ps1 |  7 ++
 eng/testing/performance/performance-setup.sh  | 44 ++++++++---
 src/mono/sample/iOS-NativeAOT/Makefile        |  2 +-
 src/mono/sample/iOS/Makefile                  |  2 +-
 10 files changed, 251 insertions(+), 42 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 67059abc768308..6aea6bedf1ecb6 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -164,6 +164,24 @@ jobs:
         runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
         logicalmachine: 'perfiphone12mini'
         iOSLlvmBuild: False
+        iOSStripSymbols: False
+
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: False
+        iOSStripSymbols: True
 
   - template: /eng/pipelines/common/platform-matrix.yml
     parameters:
@@ -180,6 +198,24 @@ jobs:
         runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
         logicalmachine: 'perfiphone12mini'
         iOSLlvmBuild: True
+        iOSStripSymbols: False
+
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: True
+        iOSStripSymbols: True
 
   # run NativeAOT iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -196,6 +232,23 @@ jobs:
         runKind: ios_scenarios
         runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
         logicalmachine: 'perfiphone12mini'
+        iOSStripSymbols: False
+
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSNativeAOT
+        projectFile: ios_nativeaot_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSStripSymbols: True
 
   # # run mono microbenchmarks perf job
   # - template: /eng/pipelines/common/platform-matrix.yml
diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index 90c9fc2cfd5179..87cb0555aa2628 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -37,11 +37,11 @@ steps:
       displayName: clean bindir
 
   - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSMono')) }}:
-    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false
+    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
       env:
         DevTeamProvisioning: '-'
       workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-      displayName: Build HelloiOS AOT sample app LLVM=False
+      displayName: Build HelloiOS AOT sample app LLVM=False STRIP_SYMBOLS=False
     - task: PublishBuildArtifacts@1
       condition: succeededOrFailed()
       displayName: 'Publish binlog'
@@ -59,11 +59,33 @@ steps:
     - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
       workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
       displayName: Clean bindir
-    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false
+    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=False DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
       env:
         DevTeamProvisioning: '-'
       workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
-      displayName: Build HelloiOS AOT sample app LLVM=True
+      displayName: Build HelloiOS AOT sample app LLVM=False STRIP_SYMBOLS=True
+    - task: PublishBuildArtifacts@1
+      condition: succeededOrFailed()
+      displayName: 'Publish binlog'
+      inputs:
+        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+        artifactName:  ${{ parameters.artifactName }}
+    - template: /eng/pipelines/common/upload-artifact-step.yml
+      parameters:
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        includeRootFolder: true
+        displayName: iOS Sample App NoLLVM NoSymbols
+        artifactName: iOSSampleAppNoLLVMNoSymbols
+        archiveExtension: '.zip'
+        archiveType: zip
+    - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Clean bindir
+    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
+      env:
+        DevTeamProvisioning: '-'
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Build HelloiOS AOT sample app LLVM=True STRIP_SYMBOLS=False
     - task: PublishBuildArtifacts@1
       condition: succeededOrFailed()
       displayName: 'Publish binlog'
@@ -78,13 +100,35 @@ steps:
         artifactName: iOSSampleAppLLVM
         archiveExtension: '.zip'
         archiveType: zip
+    - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Clean bindir
+    - script: make build-appbundle TARGET=ios MONO_ARCH=arm64 MONO_CONFIG=Release AOT=True USE_LLVM=True DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
+      env:
+        DevTeamProvisioning: '-'
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS
+      displayName: Build HelloiOS AOT sample app LLVM=True STRIP_SYMBOLS=True
+    - task: PublishBuildArtifacts@1
+      condition: succeededOrFailed()
+      displayName: 'Publish binlog'
+      inputs:
+        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS/msbuild.binlog
+        artifactName:  ${{ parameters.artifactName }}
+    - template: /eng/pipelines/common/upload-artifact-step.yml
+      parameters:
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        includeRootFolder: true
+        displayName: iOS Sample App LLVM NoSymbols
+        artifactName: iOSSampleAppLLVMNoSymbols
+        archiveExtension: '.zip'
+        archiveType: zip
 
   - ${{ if and(eq(parameters.osGroup, 'ios'), eq(parameters.nameSuffix, 'iOSNativeAOT')) }}:
-    - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false
+    - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=false
       env:
         DevTeamProvisioning: '-'
       workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
-      displayName: Build HelloiOS Native AOT sample app
+      displayName: Build HelloiOS Native AOT sample app STRIP_SYMBOLS=False
     - task: PublishBuildArtifacts@1
       condition: succeededOrFailed()
       displayName: 'Publish binlog'
@@ -99,3 +143,25 @@ steps:
         artifactName: iOSSampleApp
         archiveExtension: '.zip'
         archiveType: zip
+    - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
+      displayName: Clean bindir
+    - script: make world TARGET_OS=ios TARGET_ARCH=arm64 BUILD_CONFIG=Release DEPLOY_AND_RUN=false STRIP_DEBUG_SYMBOLS=true
+      env:
+        DevTeamProvisioning: '-'
+      workingDirectory: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT
+      displayName: Build HelloiOS Native AOT sample app STRIP_SYMBOLS=True
+    - task: PublishBuildArtifacts@1
+      condition: succeededOrFailed()
+      displayName: 'Publish binlog'
+      inputs:
+        pathtoPublish: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/msbuild.binlog
+        artifactName:  ${{ parameters.artifactName }}
+    - template: /eng/pipelines/common/upload-artifact-step.yml
+      parameters:
+        rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
+        includeRootFolder: true
+        displayName: iOS Sample App
+        artifactName: iOSSampleAppNoSymbols
+        archiveExtension: '.zip'
+        archiveType: zip
\ No newline at end of file
diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index a7840025c3098a..00362e4cf8349c 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -19,6 +19,7 @@ parameters:
   pgoRunType: ''
   javascriptEngine: 'NoJS'
   iOSLlvmBuild: 'False'
+  iOSStripSymbols: 'False'
   skipLiveLibrariesDownload: false
   collectHelixLogsScript: ''
   timeoutInMinutes: 320
@@ -37,8 +38,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}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild) }}
-    displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild) }}
+    jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}', 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}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols) }}
     pool: ${{ parameters.pool }}
     buildConfig: ${{ parameters.buildConfig }}
     archType: ${{ parameters.archType }}
@@ -56,6 +57,7 @@ jobs:
     pgoRunType: ${{ parameters.pgoRunType }}
     javascriptEngine: ${{ parameters.javascriptEngine }}
     iosLlvmBuild: ${{ parameters.iosLlvmBuild }}
+    iosStripSymbols: ${{ parameters.iosStripSymbols }}
     timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
 
     ${{ if and(eq(parameters.runtimeType, 'wasm'), eq(parameters.codeGenType, 'aot')) }}:
@@ -106,10 +108,10 @@ jobs:
         extraSetupParameters: --corerootdirectory $(Build.SourcesDirectory)/artifacts/tests/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.Release/Tests/Core_Root --architecture ${{ parameters.archType }} --alpine
     ${{ if in(parameters.runtimeType, 'AndroidMono') }}:
       extraSetupParameters: -Architecture ${{ parameters.archType }} -AndroidMono
-    ${{ if in(parameters.runtimeType, 'iosMono') }}:
-      extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }}
+    ${{ if in(parameters.runtimeType, 'iOSMono') }}:
+      extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }} ${{ parameters.iOSStripSymbols }}
     ${{ if in(parameters.runtimeType, 'iOSNativeAOT') }}:
-      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot
+      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot ${{ parameters.iOSStripSymbols }}
 
     variables:
     - ${{ each variable in parameters.variables }}:
@@ -230,25 +232,39 @@ jobs:
     - ${{ if eq(parameters.runtimeType, 'iOSMono') }}: 
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvm
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols/nollvm
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleAppNoLLVM.zip'
           artifactName: 'iOSSampleAppNoLLVM'
           displayName: 'iOS Sample App NoLLVM'
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvm
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols/llvm/
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleAppLLVM.zip'
           artifactName: 'iOSSampleAppLLVM'
           displayName: 'iOS Sample App LLVM'
+      - template: /eng/pipelines/common/download-artifact-step.yml
+        parameters:
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols/nollvm
+          cleanUnpackFolder: false
+          artifactFileName: 'iOSSampleAppNoLLVMNoSymbols.zip'
+          artifactName: 'iOSSampleAppNoLLVMNoSymbols'
+          displayName: 'iOS Sample App NoLLVM NoSymbols'
+      - template: /eng/pipelines/common/download-artifact-step.yml
+        parameters:
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols/llvm
+          cleanUnpackFolder: false
+          artifactFileName: 'iOSSampleAppLLVMNoSymbols.zip'
+          artifactName: 'iOSSampleAppLLVMNoSymbols'
+          displayName: 'iOS Sample App LLVM NoSymbols'
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
         displayName: 'Download iOS Sample App NoLLVM'
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmzip'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols/nollvmzip'
           artifactName: 'iOSSampleAppNoLLVM'
           checkDownloadedFiles: true
       # same artifact as above but don't extract .zip
@@ -257,28 +273,62 @@ jobs:
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmzip'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols/llvmzip'
           artifactName: 'iOSSampleAppLLVM'
           checkDownloadedFiles: true
+      # same artifact as above but don't extract .zip
+      - task: DownloadBuildArtifacts@0
+        displayName: 'Download iOS Sample App NoLLVM NoSymbols'
+        inputs:
+          buildType: current
+          downloadType: single
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols/nollvmzip'
+          artifactName: 'iOSSampleAppNoLLVMNoSymbols'
+          checkDownloadedFiles: true
+      # same artifact as above but don't extract .zip
+      - task: DownloadBuildArtifacts@0
+        displayName: 'Download iOS Sample App LLVM NoSymbols'
+        inputs:
+          buildType: current
+          downloadType: single
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols/llvmzip'
+          artifactName: 'iOSSampleAppLLVMNoSymbols'
+          checkDownloadedFiles: true
 
     # Download iOSNativeAOT tests
     - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT') }}: 
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nativeaot
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleApp.zip'
           artifactName: 'iOSSampleApp'
           displayName: 'iOS Sample App'
+      - template: /eng/pipelines/common/download-artifact-step.yml
+        parameters:
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols
+          cleanUnpackFolder: false
+          artifactFileName: 'iOSSampleAppNoSymbols.zip'
+          artifactName: 'iOSSampleAppNoSymbols'
+          displayName: 'iOS Sample App NoSymbols'
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
         displayName: 'Download iOS Sample App'
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nativeaotzip'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols'
           artifactName: 'iOSSampleApp'
           checkDownloadedFiles: true
+      # same artifact as above but don't extract .zip
+      - task: DownloadBuildArtifacts@0
+        displayName: 'Download iOS Sample App NoSymbols'
+        inputs:
+          buildType: current
+          downloadType: single
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols'
+          artifactName: 'iOSSampleAppNoSymbols'
+          checkDownloadedFiles: true
 
     # Create Core_Root
     - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg) $(_crossBuildPropertyArg)
diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
index c8267446e516d8..b911aa627d71d3 100644
--- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml
+++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml
@@ -215,6 +215,6 @@ jobs:
       displayName: Publish Logs
       inputs:
         targetPath: $(Build.SourcesDirectory)/artifacts/log
-        artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_$(iOSLlvmBuild)'
+        artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_$(iOSLlvmBuild)_$(iOSStripSymbols)'
       continueOnError: true
       condition: always()
diff --git a/eng/testing/performance/ios_nativeaot_scenarios.proj b/eng/testing/performance/ios_nativeaot_scenarios.proj
index af6654fda08989..7bf8d9585ddcd7 100644
--- a/eng/testing/performance/ios_nativeaot_scenarios.proj
+++ b/eng/testing/performance/ios_nativeaot_scenarios.proj
@@ -14,6 +14,11 @@
     </HelixCorrelationPayload>
   </ItemGroup>
 
+  <PropertyGroup>
+    <SymbolsPath>symbols</SymbolsPath>
+    <SymbolsPath Condition="'$(iOSStripSymbols)' == 'True'">nosymbols</SymbolsPath>
+  </PropertyGroup>
+
   <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
     <ScenarioDirectory>%HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\</ScenarioDirectory>
 
@@ -23,19 +28,20 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT .app Size">
+    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT .app Size $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/nativeaot ./app;$(Python) pre.py --name app</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(SymbolsPath) ./app;$(Python) pre.py --name app</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
-    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT Zip Size">
+    <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT Zip Size $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/nativeaotzip/iOSSampleApp/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip</PreCommands>
+      <PreCommands Condition="'$(SymbolsPath)' == 'symbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)zip/iOSSampleApp/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip</PreCommands>
+      <PreCommands Condition="'$(SymbolsPath)' == 'nosymbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)zip/iOSSampleApp/iOSSampleApp$(SymbolsPath).zip .;$(Python) pre.py --name iOSSampleApp$(SymbolsPath).zip</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
-    <XHarnessAppBundleToTest Include="Device Startup - iOS Native AOT HelloWorld">
+    <XHarnessAppBundleToTest Include="Device Startup - iOS Native AOT HelloWorld $(SymbolsPath)">
       <AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
       <WorkItemTimeout>00:15:00</WorkItemTimeout>
       <TestTarget>ios-device</TestTarget>
@@ -44,7 +50,7 @@
           # PreCommands
           export XHARNESSPATH=$XHARNESS_CLI_PATH
 
-          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/nativeaot/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
+          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(SymbolsPath)/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
           cp -f embedded.mobileprovision $(ScenarioDirectory)helloios/HelloiOS.app
           cd $(ScenarioDirectory)helloios
           sign HelloiOS.app
diff --git a/eng/testing/performance/ios_scenarios.proj b/eng/testing/performance/ios_scenarios.proj
index 6b30417fdff479..312846f79878c5 100644
--- a/eng/testing/performance/ios_scenarios.proj
+++ b/eng/testing/performance/ios_scenarios.proj
@@ -17,6 +17,8 @@
   <PropertyGroup>
     <LlvmPath>nollvm</LlvmPath>
     <LlvmPath Condition="'$(iOSLlvmBuild)' == 'True'">llvm</LlvmPath>
+    <SymbolsPath>symbols</SymbolsPath>
+    <SymbolsPath Condition="'$(iOSStripSymbols)' == 'True'">nosymbols</SymbolsPath>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
@@ -28,19 +30,20 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <HelixWorkItem Include="SOD - iOS HelloWorld .app Size">
+    <HelixWorkItem Include="SOD - iOS HelloWorld .app Size $(LlvmPath) $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath) ./app;$(Python) pre.py --name app</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(SymbolsPath)/$(LlvmPath) ./app;$(Python) pre.py --name app</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
-    <HelixWorkItem Include="SOD - iOS HelloWorld Mono Zip Size $(LlvmPath)">
+    <HelixWorkItem Include="SOD - iOS HelloWorld Mono Zip Size $(LlvmPath) $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(LlvmPath)zip/iOSSampleApp$(LlvmPath)/iOSSampleApp$(LlvmPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath).zip</PreCommands>
+      <PreCommands Condition="'$(SymbolsPath)' == 'symbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)/$(LlvmPath)zip/iOSSampleApp$(LlvmPath)/iOSSampleApp$(LlvmPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath).zip</PreCommands>
+      <PreCommands Condition="'$(SymbolsPath)' == 'nosymbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)/$(LlvmPath)zip/iOSSampleApp$(LlvmPath)$(SymbolsPath)/iOSSampleApp$(LlvmPath)$(SymbolsPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath)$(SymbolsPath).zip</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
-    <XHarnessAppBundleToTest Include="Device Startup - iOS Mono HelloWorld $(LlvmPath)">
+    <XHarnessAppBundleToTest Include="Device Startup - iOS Mono HelloWorld $(LlvmPath) $(SymbolsPath)">
       <AppBundlePath>$(WorkItemDirectory).zip</AppBundlePath>
       <WorkItemTimeout>00:15:00</WorkItemTimeout>
       <TestTarget>ios-device</TestTarget>
@@ -49,7 +52,7 @@
           # PreCommands
           export XHARNESSPATH=$XHARNESS_CLI_PATH
 
-          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath)/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
+          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(SymbolsPath)/$(LlvmPath)/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
           cp -f embedded.mobileprovision $(ScenarioDirectory)helloios/HelloiOS.app
           cd $(ScenarioDirectory)helloios
           sign HelloiOS.app
diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1
index 29e3d6199cb788..ed5e4b6d1ad8c7 100644
--- a/eng/testing/performance/performance-setup.ps1
+++ b/eng/testing/performance/performance-setup.ps1
@@ -22,10 +22,12 @@ Param(
     [string] $LogicalMachine="",
     [switch] $AndroidMono,
     [switch] $iOSMono,
+    [switch] $iOSNativeAOT,
     [switch] $NoPGO,
     [switch] $DynamicPGO,
     [switch] $FullPGO,
     [switch] $iOSLlvmBuild,
+    [switch] $iOSStripSymbols,
     [string] $MauiVersion,
     [switch] $UseLocalCommitTime
 )
@@ -98,6 +100,11 @@ elseif($FullPGO)
 
 if ($iOSMono) {
     $Configurations += " iOSLlvmBuild=$iOSLlvmBuild"
+    $Configurations += " iOSStripSymbols=$iOSStripSymbols"
+}
+
+if ($iOSNativeAOT) {
+    $Configurations += " iOSStripSymbols=$iOSStripSymbols"
 }
 
 # FIX ME: This is a workaround until we get this from the actual pipeline
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 5073a0681256bb..c583fa208cd8f3 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -37,6 +37,7 @@ logical_machine=
 javascript_engine="v8"
 iosmono=false
 iosllvmbuild=""
+iosstripsymbols=""
 iosnativeaot=false
 maui_version=""
 use_local_commit_time=false
@@ -180,6 +181,10 @@ while (($# > 0)); do
       iosllvmbuild=$2
       shift 2
       ;;
+    --iosstripsymbols)
+      iosstripsymbols=$2
+      shift 2
+      ;;
     --mauiversion)
       maui_version=$2
       shift 2
@@ -229,6 +234,7 @@ while (($# > 0)); do
       echo "  --iosmono                      Set for ios Mono/Maui runs"
       echo "  --iosnativeaot                 Set for ios Native AOT runs"
       echo "  --iosllvmbuild                 Set LLVM for iOS Mono/Maui runs"
+      echo "  --iosstripsymbols              Set STRIP_DEBUG_SYMBOLS for iOS Mono/Maui runs"
       echo "  --mauiversion                  Set the maui version for Mono/Maui runs"
       echo "  --uselocalcommittime           Pass local runtime commit time to the setup script"
       echo "  --nopgo                        Set for No PGO runs"
@@ -335,12 +341,12 @@ if [[ "$monoaot" == "true" ]]; then
 fi
 
 if [[ "$iosmono" == "true" ]]; then
-    configurations="$configurations iOSLlvmBuild=$iosllvmbuild"
+    configurations="$configurations iOSLlvmBuild=$iosllvmbuild iOSStripSymbols=$iosstripsymbols"
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
 fi
 
 if [[ "$iosnativeaot" == "true" ]]; then
-    configurations="$configurations"
+    configurations="$configurations iOSStripSymbols=$iosstripsymbols"
     extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments"
 fi
 
@@ -448,20 +454,37 @@ if [[ "$use_baseline_core_run" == true ]]; then
 fi
 
 if [[ "$iosmono" == "true" ]]; then
-    if [[ "$iosllvmbuild" == "True" ]]; then
-        # LLVM Mono .app
-        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvm $payload_directory/iosHelloWorld
-        mkdir -p $payload_directory/iosHelloWorldZip/llvmzip && cp -rv $source_directory/iosHelloWorldZip/llvmzip $payload_directory/iosHelloWorldZip
+    if [[ "$iosllvmbuild" == "true" ]]; then
+      if [[ "$iosstripsymbols" == "true" ]]; then
+          # LLVM NoSymbols Mono .app
+          mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols/llvm $payload_directory/iosHelloWorld
+          mkdir -p $payload_directory/iosHelloWorldZip/nosymbols/llvmzip && cp -rv $source_directory/iosHelloWorldZip/nosymbols/llvmzip $payload_directory/iosHelloWorldZip
+      else
+          # LLVM Mono .app
+          mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols/llvm $payload_directory/iosHelloWorld
+          mkdir -p $payload_directory/iosHelloWorldZip/symbols/llvmzip && cp -rv $source_directory/iosHelloWorldZip/symbols/llvmzip $payload_directory/iosHelloWorldZip
+      fi
     else
+      if [[ "$iosstripsymbols" == "true" ]]; then
+        # NoLLVM Mono .app
+        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols/nollvm $payload_directory/iosHelloWorld
+        mkdir -p $payload_directory/iosHelloWorldZip/nosymbols/nollvmzip && cp -rv $source_directory/iosHelloWorldZip/nosymbols/nollvmzip $payload_directory/iosHelloWorldZip
+      else
         # NoLLVM Mono .app
-        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvm $payload_directory/iosHelloWorld
-        mkdir -p $payload_directory/iosHelloWorldZip/nollvmzip && cp -rv $source_directory/iosHelloWorldZip/nollvmzip $payload_directory/iosHelloWorldZip
+        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols/nollvm $payload_directory/iosHelloWorld
+        mkdir -p $payload_directory/iosHelloWorldZip/symbols/nollvmzip && cp -rv $source_directory/iosHelloWorldZip/symbols/nollvmzip $payload_directory/iosHelloWorldZip
+      fi
     fi
 fi
 
 if [[ "$iosnativeaot" == "true" ]]; then
-    mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nativeaot $payload_directory/iosHelloWorld
-    mkdir -p $payload_directory/iosHelloWorldZip/nativeaotzip && cp -rv $source_directory/iosHelloWorldZip/nativeaotzip $payload_directory/iosHelloWorldZip
+  if [[ "$iosstripsymbols" == "true" ]]; then
+    mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols $payload_directory/iosHelloWorld
+    mkdir -p $payload_directory/iosHelloWorldZip/nosymbolszip && cp -rv $source_directory/iosHelloWorldZip/nosymbolszip $payload_directory/iosHelloWorldZip
+  else
+    mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols $payload_directory/iosHelloWorld
+    mkdir -p $payload_directory/iosHelloWorldZip/symbolszip && cp -rv $source_directory/iosHelloWorldZip/symbolszip $payload_directory/iosHelloWorldZip
+  fi
 fi
 
 ci=true
@@ -495,6 +518,7 @@ Write-PipelineSetVariable -name "Compare" -value "$compare" -is_multi_job_variab
 Write-PipelineSetVariable -name "MonoDotnet" -value "$using_mono" -is_multi_job_variable false
 Write-PipelineSetVariable -name "WasmDotnet" -value "$using_wasm" -is_multi_job_variable false
 Write-PipelineSetVariable -Name 'iOSLlvmBuild' -Value "$iosllvmbuild" -is_multi_job_variable false
+Write-PipelineSetVariable -Name 'iOSStripSymbols' -Value "$iosstripsymbols" -is_multi_job_variable false
 Write-PipelineSetVariable -name "OnlySanityCheck" -value "$only_sanity" -is_multi_job_variable false
 
 # Put it back to what was set on top of this script
diff --git a/src/mono/sample/iOS-NativeAOT/Makefile b/src/mono/sample/iOS-NativeAOT/Makefile
index 601c2cbe60c120..e1e295a75d9e71 100644
--- a/src/mono/sample/iOS-NativeAOT/Makefile
+++ b/src/mono/sample/iOS-NativeAOT/Makefile
@@ -6,7 +6,7 @@ BUILD_CONFIG?=Debug
 TARGET_ARCH?=$(shell . $(TOP)eng/native/init-os-and-arch.sh && echo $${arch})
 TARGET_OS?=iossimulator
 DEPLOY_AND_RUN?=false
-STRIP_DEBUG_SYMBOLS?=true
+STRIP_DEBUG_SYMBOLS?=false
 
 REPO_DIR=$(realpath $(TOP))
 TASKS_DIR=$(REPO_DIR)/src/tasks
diff --git a/src/mono/sample/iOS/Makefile b/src/mono/sample/iOS/Makefile
index 44953d242aa43c..ef24938c6fd304 100644
--- a/src/mono/sample/iOS/Makefile
+++ b/src/mono/sample/iOS/Makefile
@@ -6,7 +6,7 @@ AOT?=false
 TARGET?=iossimulator
 DEPLOY_AND_RUN?=true
 APP_SANDBOX?=false
-STRIP_DEBUG_SYMBOLS?=true # only used when measuring SOD via build-appbundle make target
+STRIP_DEBUG_SYMBOLS?=false # only used when measuring SOD via build-appbundle make target
 
 #If DIAGNOSTIC_PORTS is enabled, RUNTIME_COMPONENTS must also be enabled.
 #If RUNTIME_COMPONENTS is enabled, DIAGNOSTIC_PORTS is optional.

From 23ee1f1ad8f998d0ba0c4764f27c48e4a1f3c843 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 25 May 2023 13:56:59 +0200
Subject: [PATCH 44/57] Fix path

---
 eng/pipelines/coreclr/templates/perf-job.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index 00362e4cf8349c..1917d313e5926d 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -239,7 +239,7 @@ jobs:
           displayName: 'iOS Sample App NoLLVM'
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols/llvm/
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols/llvm
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleAppLLVM.zip'
           artifactName: 'iOSSampleAppLLVM'

From fbe116ac5180c80120ee79e71a4a11d3399472cc Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 25 May 2023 14:03:22 +0200
Subject: [PATCH 45/57] Test perf jobs

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 194 +++++++++----------
 1 file changed, 97 insertions(+), 97 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 6aea6bedf1ecb6..2cba238dba992c 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -1,6 +1,6 @@
 jobs:
 
-- ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+# - ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
 
 #   # build mono
 #   - template: /eng/pipelines/common/platform-matrix.yml
@@ -148,107 +148,107 @@ jobs:
   #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
   #       logicalmachine: 'perfpixel4a'
 
-  # run mono iOS scenarios scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSMono
-        projectFile: ios_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSLlvmBuild: False
-        iOSStripSymbols: False
+  # # run mono iOS scenarios scenarios
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSMono
+  #       projectFile: ios_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSLlvmBuild: False
+  #       iOSStripSymbols: False
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSMono
-        projectFile: ios_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSLlvmBuild: False
-        iOSStripSymbols: True
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSMono
+  #       projectFile: ios_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSLlvmBuild: False
+  #       iOSStripSymbols: True
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSMono
-        projectFile: ios_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSLlvmBuild: True
-        iOSStripSymbols: False
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSMono
+  #       projectFile: ios_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSLlvmBuild: True
+  #       iOSStripSymbols: False
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSMono
-        projectFile: ios_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSLlvmBuild: True
-        iOSStripSymbols: True
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSMono
+  #       projectFile: ios_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSLlvmBuild: True
+  #       iOSStripSymbols: True
 
-  # run NativeAOT iOS scenarios
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSNativeAOT
-        projectFile: ios_nativeaot_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSStripSymbols: False
+  # # run NativeAOT iOS scenarios
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSNativeAOT
+  #       projectFile: ios_nativeaot_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSStripSymbols: False
 
-  - template: /eng/pipelines/common/platform-matrix.yml
-    parameters:
-      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-      buildConfig: release
-      runtimeFlavor: mono
-      platforms:
-        - osx_x64
-      jobParameters:
-        testGroup: perf
-        runtimeType: iOSNativeAOT
-        projectFile: ios_nativeaot_scenarios.proj
-        runKind: ios_scenarios
-        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-        logicalmachine: 'perfiphone12mini'
-        iOSStripSymbols: True
+  # - template: /eng/pipelines/common/platform-matrix.yml
+  #   parameters:
+  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+  #     buildConfig: release
+  #     runtimeFlavor: mono
+  #     platforms:
+  #       - osx_x64
+  #     jobParameters:
+  #       testGroup: perf
+  #       runtimeType: iOSNativeAOT
+  #       projectFile: ios_nativeaot_scenarios.proj
+  #       runKind: ios_scenarios
+  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+  #       logicalmachine: 'perfiphone12mini'
+  #       iOSStripSymbols: True
 
   # # run mono microbenchmarks perf job
   # - template: /eng/pipelines/common/platform-matrix.yml

From 5bb7d9cd7882eb927b158c6224d360324762478a Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 25 May 2023 14:10:08 +0200
Subject: [PATCH 46/57] Test perf jobs

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 192 +++++++++----------
 1 file changed, 96 insertions(+), 96 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 2cba238dba992c..c9f5b62127489d 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -148,107 +148,107 @@ jobs:
   #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
   #       logicalmachine: 'perfpixel4a'
 
-  # # run mono iOS scenarios scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSMono
-  #       projectFile: ios_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSLlvmBuild: False
-  #       iOSStripSymbols: False
+  # run mono iOS scenarios scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: False
+        iOSStripSymbols: False
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSMono
-  #       projectFile: ios_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSLlvmBuild: False
-  #       iOSStripSymbols: True
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: False
+        iOSStripSymbols: True
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSMono
-  #       projectFile: ios_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSLlvmBuild: True
-  #       iOSStripSymbols: False
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: True
+        iOSStripSymbols: False
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSMono
-  #       projectFile: ios_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSLlvmBuild: True
-  #       iOSStripSymbols: True
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSMono
+        projectFile: ios_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSLlvmBuild: True
+        iOSStripSymbols: True
 
-  # # run NativeAOT iOS scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSNativeAOT
-  #       projectFile: ios_nativeaot_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSStripSymbols: False
+  # run NativeAOT iOS scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSNativeAOT
+        projectFile: ios_nativeaot_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSStripSymbols: False
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - osx_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: iOSNativeAOT
-  #       projectFile: ios_nativeaot_scenarios.proj
-  #       runKind: ios_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfiphone12mini'
-  #       iOSStripSymbols: True
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - osx_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: iOSNativeAOT
+        projectFile: ios_nativeaot_scenarios.proj
+        runKind: ios_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfiphone12mini'
+        iOSStripSymbols: True
 
   # # run mono microbenchmarks perf job
   # - template: /eng/pipelines/common/platform-matrix.yml

From 5a95dd3cf5b3f29ae0d05b31c10ce79b632a0d35 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 25 May 2023 14:12:43 +0200
Subject: [PATCH 47/57] Test perf jobs

---
 eng/pipelines/coreclr/templates/perf-job.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index 1917d313e5926d..cd351f8bd55943 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -38,8 +38,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}', 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}', 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}', 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) }}
     pool: ${{ parameters.pool }}
     buildConfig: ${{ parameters.buildConfig }}
     archType: ${{ parameters.archType }}

From 7d9e8bdab4dc3f368d70713a806d546f0a47cc72 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Thu, 25 May 2023 18:16:33 +0200
Subject: [PATCH 48/57] Add --iosstripsymbols parameter

---
 eng/pipelines/coreclr/templates/perf-job.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index cd351f8bd55943..83e3de16149215 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -109,9 +109,9 @@ jobs:
     ${{ if in(parameters.runtimeType, 'AndroidMono') }}:
       extraSetupParameters: -Architecture ${{ parameters.archType }} -AndroidMono
     ${{ if in(parameters.runtimeType, 'iOSMono') }}:
-      extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }} ${{ parameters.iOSStripSymbols }}
+      extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }} --iosstripsymbols ${{ parameters.iOSStripSymbols }}
     ${{ if in(parameters.runtimeType, 'iOSNativeAOT') }}:
-      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot ${{ parameters.iOSStripSymbols }}
+      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot --iosstripsymbols ${{ parameters.iOSStripSymbols }}
 
     variables:
     - ${{ each variable in parameters.variables }}:

From fc735797f186bb9f58c6c9eac2f6f8f7608b4a44 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Fri, 26 May 2023 15:01:58 +0200
Subject: [PATCH 49/57] Fix zip bundle path

---
 eng/testing/performance/performance-setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index c583fa208cd8f3..45265183d50780 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -480,10 +480,10 @@ fi
 if [[ "$iosnativeaot" == "true" ]]; then
   if [[ "$iosstripsymbols" == "true" ]]; then
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols $payload_directory/iosHelloWorld
-    mkdir -p $payload_directory/iosHelloWorldZip/nosymbolszip && cp -rv $source_directory/iosHelloWorldZip/nosymbolszip $payload_directory/iosHelloWorldZip
+    mkdir -p $payload_directory/iosHelloWorldZip/nosymbols && cp -rv $source_directory/iosHelloWorldZip/nosymbols $payload_directory/iosHelloWorldZip
   else
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols $payload_directory/iosHelloWorld
-    mkdir -p $payload_directory/iosHelloWorldZip/symbolszip && cp -rv $source_directory/iosHelloWorldZip/symbolszip $payload_directory/iosHelloWorldZip
+    mkdir -p $payload_directory/iosHelloWorldZip/symbols && cp -rv $source_directory/iosHelloWorldZip/symbols $payload_directory/iosHelloWorldZip
   fi
 fi
 

From a8ced4d53187d38a1469b26c00ef4f1812b250fb Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Sun, 28 May 2023 15:44:35 +0200
Subject: [PATCH 50/57] Fix bundle paths

---
 .../templates/build-perf-sample-apps.yml      | 10 ++--
 eng/pipelines/coreclr/templates/perf-job.yml  | 46 +++++++++----------
 .../performance/ios_nativeaot_scenarios.proj  |  3 +-
 eng/testing/performance/ios_scenarios.proj    |  7 ++-
 eng/testing/performance/performance-setup.sh  | 16 +++----
 5 files changed, 40 insertions(+), 42 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
index 87cb0555aa2628..89604f865c4ae8 100644
--- a/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+++ b/eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
@@ -53,7 +53,7 @@ steps:
         rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
         includeRootFolder: true
         displayName: iOS Sample App NoLLVM
-        artifactName: iOSSampleAppNoLLVM
+        artifactName: iOSSampleAppNoLLVMSymbols
         archiveExtension: '.zip'
         archiveType: zip
     - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
@@ -97,7 +97,7 @@ steps:
         rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS/bin/ios-arm64/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
         includeRootFolder: true
         displayName: iOS Sample App LLVM
-        artifactName: iOSSampleAppLLVM
+        artifactName: iOSSampleAppLLVMSymbols
         archiveExtension: '.zip'
         archiveType: zip
     - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS/bin
@@ -139,8 +139,8 @@ steps:
       parameters:
         rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
         includeRootFolder: true
-        displayName: iOS Sample App
-        artifactName: iOSSampleApp
+        displayName: iOS Sample App Symbols
+        artifactName: iOSSampleAppSymbols
         archiveExtension: '.zip'
         archiveType: zip
     - script: rm -r -f $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin
@@ -161,7 +161,7 @@ steps:
       parameters:
         rootFolder: $(Build.SourcesDirectory)/src/mono/sample/iOS-NativeAOT/bin/publish/app/HelloiOS/Release-iphoneos/HelloiOS.app
         includeRootFolder: true
-        displayName: iOS Sample App
+        displayName: iOS Sample App NoSymbols
         artifactName: iOSSampleAppNoSymbols
         archiveExtension: '.zip'
         archiveType: zip
\ No newline at end of file
diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index 83e3de16149215..8c3eeece867057 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -232,49 +232,49 @@ jobs:
     - ${{ if eq(parameters.runtimeType, 'iOSMono') }}: 
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols/nollvm
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvmsymbols
           cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppNoLLVM.zip'
-          artifactName: 'iOSSampleAppNoLLVM'
-          displayName: 'iOS Sample App NoLLVM'
+          artifactFileName: 'iOSSampleAppNoLLVMSymbols.zip'
+          artifactName: 'iOSSampleAppNoLLVMSymbols'
+          displayName: 'iOS Sample App NoLLVM Symbols'
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols/llvm
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvmsymbols
           cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppLLVM.zip'
-          artifactName: 'iOSSampleAppLLVM'
-          displayName: 'iOS Sample App LLVM'
+          artifactFileName: 'iOSSampleAppLLVMSymbols.zip'
+          artifactName: 'iOSSampleAppLLVMSymbols'
+          displayName: 'iOS Sample App LLVM Symbols'
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols/nollvm
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvmnosymbols
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleAppNoLLVMNoSymbols.zip'
           artifactName: 'iOSSampleAppNoLLVMNoSymbols'
           displayName: 'iOS Sample App NoLLVM NoSymbols'
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols/llvm
+          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvmnosymbols
           cleanUnpackFolder: false
           artifactFileName: 'iOSSampleAppLLVMNoSymbols.zip'
           artifactName: 'iOSSampleAppLLVMNoSymbols'
           displayName: 'iOS Sample App LLVM NoSymbols'
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App NoLLVM'
+        displayName: 'Download iOS Sample App NoLLVM Symbols'
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols/nollvmzip'
-          artifactName: 'iOSSampleAppNoLLVM'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmsymbolszip'
+          artifactName: 'iOSSampleAppNoLLVMSymbols'
           checkDownloadedFiles: true
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App LLVM'
+        displayName: 'Download iOS Sample App LLVM Symbols'
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols/llvmzip'
-          artifactName: 'iOSSampleAppLLVM'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmsymbolszip'
+          artifactName: 'iOSSampleAppLLVMSymbols'
           checkDownloadedFiles: true
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
@@ -282,7 +282,7 @@ jobs:
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols/nollvmzip'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmnosymbolszip'
           artifactName: 'iOSSampleAppNoLLVMNoSymbols'
           checkDownloadedFiles: true
       # same artifact as above but don't extract .zip
@@ -291,7 +291,7 @@ jobs:
         inputs:
           buildType: current
           downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols/llvmzip'
+          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmnosymbolszip'
           artifactName: 'iOSSampleAppLLVMNoSymbols'
           checkDownloadedFiles: true
 
@@ -301,9 +301,9 @@ jobs:
         parameters:
           unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols
           cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleApp.zip'
-          artifactName: 'iOSSampleApp'
-          displayName: 'iOS Sample App'
+          artifactFileName: 'iOSSampleAppSymbols.zip'
+          artifactName: 'iOSSampleAppSymbols'
+          displayName: 'iOS Sample App Symbols'
       - template: /eng/pipelines/common/download-artifact-step.yml
         parameters:
           unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols
@@ -313,12 +313,12 @@ jobs:
           displayName: 'iOS Sample App NoSymbols'
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App'
+        displayName: 'Download iOS Sample App Symbols'
         inputs:
           buildType: current
           downloadType: single
           downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols'
-          artifactName: 'iOSSampleApp'
+          artifactName: 'iOSSampleAppSymbols'
           checkDownloadedFiles: true
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
diff --git a/eng/testing/performance/ios_nativeaot_scenarios.proj b/eng/testing/performance/ios_nativeaot_scenarios.proj
index 7bf8d9585ddcd7..a63547110a999f 100644
--- a/eng/testing/performance/ios_nativeaot_scenarios.proj
+++ b/eng/testing/performance/ios_nativeaot_scenarios.proj
@@ -36,8 +36,7 @@
     </HelixWorkItem>
     <HelixWorkItem Include="SOD - iOS HelloWorld Native AOT Zip Size $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands Condition="'$(SymbolsPath)' == 'symbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)zip/iOSSampleApp/iOSSampleApp.zip .;$(Python) pre.py --name iOSSampleApp.zip</PreCommands>
-      <PreCommands Condition="'$(SymbolsPath)' == 'nosymbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)zip/iOSSampleApp/iOSSampleApp$(SymbolsPath).zip .;$(Python) pre.py --name iOSSampleApp$(SymbolsPath).zip</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)zip/iOSSampleApp$(SymbolsPath)/iOSSampleApp$(SymbolsPath).zip .;$(Python) pre.py --name iOSSampleApp$(SymbolsPath).zip</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
diff --git a/eng/testing/performance/ios_scenarios.proj b/eng/testing/performance/ios_scenarios.proj
index 312846f79878c5..53b17d1228ff87 100644
--- a/eng/testing/performance/ios_scenarios.proj
+++ b/eng/testing/performance/ios_scenarios.proj
@@ -32,14 +32,13 @@
   <ItemGroup>
     <HelixWorkItem Include="SOD - iOS HelloWorld .app Size $(LlvmPath) $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(SymbolsPath)/$(LlvmPath) ./app;$(Python) pre.py --name app</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath)$(SymbolsPath) ./app;$(Python) pre.py --name app</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
     <HelixWorkItem Include="SOD - iOS HelloWorld Mono Zip Size $(LlvmPath) $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
-      <PreCommands Condition="'$(SymbolsPath)' == 'symbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)/$(LlvmPath)zip/iOSSampleApp$(LlvmPath)/iOSSampleApp$(LlvmPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath).zip</PreCommands>
-      <PreCommands Condition="'$(SymbolsPath)' == 'nosymbols'">cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(SymbolsPath)/$(LlvmPath)zip/iOSSampleApp$(LlvmPath)$(SymbolsPath)/iOSSampleApp$(LlvmPath)$(SymbolsPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath)$(SymbolsPath).zip</PreCommands>
+      <PreCommands>cd $(ScenarioDirectory)helloios;cp -v $HELIX_CORRELATION_PAYLOAD/iosHelloWorldZip/$(LlvmPath)$(SymbolsPath)zip/iOSSampleApp$(LlvmPath)$(SymbolsPath)/iOSSampleApp$(LlvmPath)$(SymbolsPath).zip .;$(Python) pre.py --name iOSSampleApp$(LlvmPath)$(SymbolsPath).zip</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
       <PostCommands>$(Python) post.py</PostCommands>
     </HelixWorkItem>
@@ -52,7 +51,7 @@
           # PreCommands
           export XHARNESSPATH=$XHARNESS_CLI_PATH
 
-          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(SymbolsPath)/$(LlvmPath)/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
+          cp -r $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath)$(SymbolsPath)/HelloiOS.app $(ScenarioDirectory)helloios/HelloiOS.app
           cp -f embedded.mobileprovision $(ScenarioDirectory)helloios/HelloiOS.app
           cd $(ScenarioDirectory)helloios
           sign HelloiOS.app
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 45265183d50780..a54506410e04a9 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -457,22 +457,22 @@ if [[ "$iosmono" == "true" ]]; then
     if [[ "$iosllvmbuild" == "true" ]]; then
       if [[ "$iosstripsymbols" == "true" ]]; then
           # LLVM NoSymbols Mono .app
-          mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols/llvm $payload_directory/iosHelloWorld
-          mkdir -p $payload_directory/iosHelloWorldZip/nosymbols/llvmzip && cp -rv $source_directory/iosHelloWorldZip/nosymbols/llvmzip $payload_directory/iosHelloWorldZip
+          mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvmnosymbols $payload_directory/iosHelloWorld
+          mkdir -p $payload_directory/iosHelloWorldZip/llvmnosymbolszip && cp -rv $source_directory/iosHelloWorldZip/llvmnosymbolszip $payload_directory/iosHelloWorldZip
       else
           # LLVM Mono .app
-          mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols/llvm $payload_directory/iosHelloWorld
-          mkdir -p $payload_directory/iosHelloWorldZip/symbols/llvmzip && cp -rv $source_directory/iosHelloWorldZip/symbols/llvmzip $payload_directory/iosHelloWorldZip
+          mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvmsymbols $payload_directory/iosHelloWorld
+          mkdir -p $payload_directory/iosHelloWorldZip/llvmsymbolszip && cp -rv $source_directory/iosHelloWorldZip/llvmsymbolszip $payload_directory/iosHelloWorldZip
       fi
     else
       if [[ "$iosstripsymbols" == "true" ]]; then
         # NoLLVM Mono .app
-        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols/nollvm $payload_directory/iosHelloWorld
-        mkdir -p $payload_directory/iosHelloWorldZip/nosymbols/nollvmzip && cp -rv $source_directory/iosHelloWorldZip/nosymbols/nollvmzip $payload_directory/iosHelloWorldZip
+        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvmnosymbols $payload_directory/iosHelloWorld
+        mkdir -p $payload_directory/iosHelloWorldZip/nollvmnosymbolszip && cp -rv $source_directory/iosHelloWorldZip/nollvmnosymbolszip $payload_directory/iosHelloWorldZip
       else
         # NoLLVM Mono .app
-        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols/nollvm $payload_directory/iosHelloWorld
-        mkdir -p $payload_directory/iosHelloWorldZip/symbols/nollvmzip && cp -rv $source_directory/iosHelloWorldZip/symbols/nollvmzip $payload_directory/iosHelloWorldZip
+        mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvmsymbols $payload_directory/iosHelloWorld
+        mkdir -p $payload_directory/iosHelloWorldZip/nollvmsymbolszip && cp -rv $source_directory/iosHelloWorldZip/nollvmsymbolszip $payload_directory/iosHelloWorldZip
       fi
     fi
 fi

From 66e2f4d08456fea326317a76b29250d705e47ffb Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 29 May 2023 16:21:58 +0200
Subject: [PATCH 51/57] Fix param number in performance script

---
 eng/pipelines/coreclr/templates/perf-job.yml  | 2 +-
 eng/testing/performance/performance-setup.ps1 | 1 +
 eng/testing/performance/performance-setup.sh  | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index 8c3eeece867057..644e0397cfc267 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -111,7 +111,7 @@ jobs:
     ${{ if in(parameters.runtimeType, 'iOSMono') }}:
       extraSetupParameters: --architecture ${{ parameters.archType }} --iosmono --iosllvmbuild ${{ parameters.iOSLlvmBuild }} --iosstripsymbols ${{ parameters.iOSStripSymbols }}
     ${{ if in(parameters.runtimeType, 'iOSNativeAOT') }}:
-      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot --iosstripsymbols ${{ parameters.iOSStripSymbols }}
+      extraSetupParameters: --architecture ${{ parameters.archType }} --iosnativeaot --iosllvmbuild ${{ parameters.iOSLlvmBuild }} --iosstripsymbols ${{ parameters.iOSStripSymbols }}
 
     variables:
     - ${{ each variable in parameters.variables }}:
diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1
index ed5e4b6d1ad8c7..86a04401179b63 100644
--- a/eng/testing/performance/performance-setup.ps1
+++ b/eng/testing/performance/performance-setup.ps1
@@ -203,6 +203,7 @@ Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRep
 Write-PipelineSetVariable -Name 'Compare' -Value "$Compare" -IsMultiJobVariable $false
 Write-PipelineSetVariable -Name 'MonoDotnet' -Value "$UsingMono" -IsMultiJobVariable $false
 Write-PipelineSetVariable -Name 'iOSLlvmBuild' -Value "$iOSLlvmBuild" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'iOSStripSymbols' -Value "$iOSStripSymbols" -IsMultiJobVariable $false
 
 # Helix Arguments
 Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index a54506410e04a9..ab8933d63a09c9 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -182,8 +182,8 @@ while (($# > 0)); do
       shift 2
       ;;
     --iosstripsymbols)
-      iosstripsymbols=$2
-      shift 2
+      iosstripsymbols=$3
+      shift 3
       ;;
     --mauiversion)
       maui_version=$2

From cbf6927eafc9c5ecd67910a737c213886f5c89dd Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 29 May 2023 17:40:21 +0200
Subject: [PATCH 52/57] Fix iosstripsymbols condition

---
 eng/testing/performance/performance-setup.sh | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index ab8933d63a09c9..bbb95a1af0991c 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -182,8 +182,8 @@ while (($# > 0)); do
       shift 2
       ;;
     --iosstripsymbols)
-      iosstripsymbols=$3
-      shift 3
+      iosstripsymbols=$2
+      shift 2
       ;;
     --mauiversion)
       maui_version=$2
@@ -454,23 +454,23 @@ if [[ "$use_baseline_core_run" == true ]]; then
 fi
 
 if [[ "$iosmono" == "true" ]]; then
-    if [[ "$iosllvmbuild" == "true" ]]; then
-      if [[ "$iosstripsymbols" == "true" ]]; then
+    if [[ "$iosllvmbuild" == true ]]; then
+      if [[ "$iosstripsymbols" == true ]]; then
           # LLVM NoSymbols Mono .app
           mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvmnosymbols $payload_directory/iosHelloWorld
           mkdir -p $payload_directory/iosHelloWorldZip/llvmnosymbolszip && cp -rv $source_directory/iosHelloWorldZip/llvmnosymbolszip $payload_directory/iosHelloWorldZip
       else
-          # LLVM Mono .app
+          # LLVM Symbols Mono .app
           mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvmsymbols $payload_directory/iosHelloWorld
           mkdir -p $payload_directory/iosHelloWorldZip/llvmsymbolszip && cp -rv $source_directory/iosHelloWorldZip/llvmsymbolszip $payload_directory/iosHelloWorldZip
       fi
     else
-      if [[ "$iosstripsymbols" == "true" ]]; then
-        # NoLLVM Mono .app
+      if [[ "$iosstripsymbols" == true ]]; then
+        # NoLLVM NoSymbols Mono .app
         mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvmnosymbols $payload_directory/iosHelloWorld
         mkdir -p $payload_directory/iosHelloWorldZip/nollvmnosymbolszip && cp -rv $source_directory/iosHelloWorldZip/nollvmnosymbolszip $payload_directory/iosHelloWorldZip
       else
-        # NoLLVM Mono .app
+        # NoLLVM Symbols Mono .app
         mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvmsymbols $payload_directory/iosHelloWorld
         mkdir -p $payload_directory/iosHelloWorldZip/nollvmsymbolszip && cp -rv $source_directory/iosHelloWorldZip/nollvmsymbolszip $payload_directory/iosHelloWorldZip
       fi
@@ -478,10 +478,12 @@ if [[ "$iosmono" == "true" ]]; then
 fi
 
 if [[ "$iosnativeaot" == "true" ]]; then
-  if [[ "$iosstripsymbols" == "true" ]]; then
+  if [[ "$iosstripsymbols" == true ]]; then
+    # NoSymbols Mono .app
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols $payload_directory/iosHelloWorld
     mkdir -p $payload_directory/iosHelloWorldZip/nosymbols && cp -rv $source_directory/iosHelloWorldZip/nosymbols $payload_directory/iosHelloWorldZip
   else
+    # NoSymbols Mono .app
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols $payload_directory/iosHelloWorld
     mkdir -p $payload_directory/iosHelloWorldZip/symbols && cp -rv $source_directory/iosHelloWorldZip/symbols $payload_directory/iosHelloWorldZip
   fi

From d576b6248acf4901c34353b983be7ddcc668e48a Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Mon, 29 May 2023 22:33:46 +0200
Subject: [PATCH 53/57] Fix iosstripsymbols condition

---
 eng/testing/performance/performance-setup.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index bbb95a1af0991c..203d14f2c1bf0d 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -454,8 +454,8 @@ if [[ "$use_baseline_core_run" == true ]]; then
 fi
 
 if [[ "$iosmono" == "true" ]]; then
-    if [[ "$iosllvmbuild" == true ]]; then
-      if [[ "$iosstripsymbols" == true ]]; then
+    if [[ "$iosllvmbuild" == "True" ]]; then
+      if [[ "$iosstripsymbols" == "True" ]]; then
           # LLVM NoSymbols Mono .app
           mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/llvmnosymbols $payload_directory/iosHelloWorld
           mkdir -p $payload_directory/iosHelloWorldZip/llvmnosymbolszip && cp -rv $source_directory/iosHelloWorldZip/llvmnosymbolszip $payload_directory/iosHelloWorldZip
@@ -465,7 +465,7 @@ if [[ "$iosmono" == "true" ]]; then
           mkdir -p $payload_directory/iosHelloWorldZip/llvmsymbolszip && cp -rv $source_directory/iosHelloWorldZip/llvmsymbolszip $payload_directory/iosHelloWorldZip
       fi
     else
-      if [[ "$iosstripsymbols" == true ]]; then
+      if [[ "$iosstripsymbols" == "True" ]]; then
         # NoLLVM NoSymbols Mono .app
         mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nollvmnosymbols $payload_directory/iosHelloWorld
         mkdir -p $payload_directory/iosHelloWorldZip/nollvmnosymbolszip && cp -rv $source_directory/iosHelloWorldZip/nollvmnosymbolszip $payload_directory/iosHelloWorldZip
@@ -478,7 +478,7 @@ if [[ "$iosmono" == "true" ]]; then
 fi
 
 if [[ "$iosnativeaot" == "true" ]]; then
-  if [[ "$iosstripsymbols" == true ]]; then
+  if [[ "$iosstripsymbols" == "True" ]]; then
     # NoSymbols Mono .app
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols $payload_directory/iosHelloWorld
     mkdir -p $payload_directory/iosHelloWorldZip/nosymbols && cp -rv $source_directory/iosHelloWorldZip/nosymbols $payload_directory/iosHelloWorldZip

From 7712fe233bd78c23011a2c8fdc7fbb9b93ff5b3d Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 30 May 2023 09:10:02 +0200
Subject: [PATCH 54/57] Add conditional steps for iOSLlvmBuild and
 iOSStripSymbols parameters

---
 eng/pipelines/coreclr/templates/perf-job.yml | 184 ++++++++++---------
 1 file changed, 95 insertions(+), 89 deletions(-)

diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml
index 644e0397cfc267..e6590143cf5ed0 100644
--- a/eng/pipelines/coreclr/templates/perf-job.yml
+++ b/eng/pipelines/coreclr/templates/perf-job.yml
@@ -229,88 +229,86 @@ jobs:
           displayName: 'Mono Android BDN Apk'
       
     # Download iOSMono tests
-    - ${{ if eq(parameters.runtimeType, 'iOSMono') }}: 
-      - template: /eng/pipelines/common/download-artifact-step.yml
-        parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvmsymbols
-          cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppNoLLVMSymbols.zip'
-          artifactName: 'iOSSampleAppNoLLVMSymbols'
-          displayName: 'iOS Sample App NoLLVM Symbols'
-      - template: /eng/pipelines/common/download-artifact-step.yml
-        parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvmsymbols
-          cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppLLVMSymbols.zip'
-          artifactName: 'iOSSampleAppLLVMSymbols'
-          displayName: 'iOS Sample App LLVM Symbols'
-      - template: /eng/pipelines/common/download-artifact-step.yml
-        parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvmnosymbols
-          cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppNoLLVMNoSymbols.zip'
-          artifactName: 'iOSSampleAppNoLLVMNoSymbols'
-          displayName: 'iOS Sample App NoLLVM NoSymbols'
-      - template: /eng/pipelines/common/download-artifact-step.yml
-        parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvmnosymbols
-          cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppLLVMNoSymbols.zip'
-          artifactName: 'iOSSampleAppLLVMNoSymbols'
-          displayName: 'iOS Sample App LLVM NoSymbols'
-      # same artifact as above but don't extract .zip
-      - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App NoLLVM Symbols'
-        inputs:
-          buildType: current
-          downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmsymbolszip'
-          artifactName: 'iOSSampleAppNoLLVMSymbols'
-          checkDownloadedFiles: true
-      # same artifact as above but don't extract .zip
-      - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App LLVM Symbols'
-        inputs:
-          buildType: current
-          downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmsymbolszip'
-          artifactName: 'iOSSampleAppLLVMSymbols'
-          checkDownloadedFiles: true
-      # same artifact as above but don't extract .zip
-      - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App NoLLVM NoSymbols'
-        inputs:
-          buildType: current
-          downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmnosymbolszip'
-          artifactName: 'iOSSampleAppNoLLVMNoSymbols'
-          checkDownloadedFiles: true
-      # same artifact as above but don't extract .zip
-      - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App LLVM NoSymbols'
-        inputs:
-          buildType: current
-          downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmnosymbolszip'
-          artifactName: 'iOSSampleAppLLVMNoSymbols'
-          checkDownloadedFiles: true
+    - ${{ if eq(parameters.runtimeType, 'iOSMono') }}:
+      - ${{ if and(eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'False')) }}:
+        - template: /eng/pipelines/common/download-artifact-step.yml
+          parameters:
+            unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvmsymbols
+            cleanUnpackFolder: false
+            artifactFileName: 'iOSSampleAppNoLLVMSymbols.zip'
+            artifactName: 'iOSSampleAppNoLLVMSymbols'
+            displayName: 'iOS Sample App NoLLVM Symbols'
+        # same artifact as above but don't extract .zip
+        - task: DownloadBuildArtifacts@0
+          displayName: 'Download iOS Sample App NoLLVM Symbols'
+          inputs:
+            buildType: current
+            downloadType: single
+            downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmsymbolszip'
+            artifactName: 'iOSSampleAppNoLLVMSymbols'
+            checkDownloadedFiles: true
+      - ${{ if and(eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'False')) }}:
+        - template: /eng/pipelines/common/download-artifact-step.yml
+          parameters:
+            unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvmsymbols
+            cleanUnpackFolder: false
+            artifactFileName: 'iOSSampleAppLLVMSymbols.zip'
+            artifactName: 'iOSSampleAppLLVMSymbols'
+            displayName: 'iOS Sample App LLVM Symbols'
+        # same artifact as above but don't extract .zip
+        - task: DownloadBuildArtifacts@0
+          displayName: 'Download iOS Sample App LLVM Symbols'
+          inputs:
+            buildType: current
+            downloadType: single
+            downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmsymbolszip'
+            artifactName: 'iOSSampleAppLLVMSymbols'
+            checkDownloadedFiles: true
+      - ${{ if and(eq(parameters.iOSLlvmBuild, 'False'), eq(parameters.iOSStripSymbols, 'True')) }}:
+        - template: /eng/pipelines/common/download-artifact-step.yml
+          parameters:
+            unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nollvmnosymbols
+            cleanUnpackFolder: false
+            artifactFileName: 'iOSSampleAppNoLLVMNoSymbols.zip'
+            artifactName: 'iOSSampleAppNoLLVMNoSymbols'
+            displayName: 'iOS Sample App NoLLVM NoSymbols'
+        # same artifact as above but don't extract .zip
+        - task: DownloadBuildArtifacts@0
+          displayName: 'Download iOS Sample App NoLLVM NoSymbols'
+          inputs:
+            buildType: current
+            downloadType: single
+            downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nollvmnosymbolszip'
+            artifactName: 'iOSSampleAppNoLLVMNoSymbols'
+            checkDownloadedFiles: true
+      - ${{ if and(eq(parameters.iOSLlvmBuild, 'True'), eq(parameters.iOSStripSymbols, 'True')) }}:
+        - template: /eng/pipelines/common/download-artifact-step.yml
+          parameters:
+            unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/llvmnosymbols
+            cleanUnpackFolder: false
+            artifactFileName: 'iOSSampleAppLLVMNoSymbols.zip'
+            artifactName: 'iOSSampleAppLLVMNoSymbols'
+            displayName: 'iOS Sample App LLVM NoSymbols'
+        # same artifact as above but don't extract .zip
+        - task: DownloadBuildArtifacts@0
+          displayName: 'Download iOS Sample App LLVM NoSymbols'
+          inputs:
+            buildType: current
+            downloadType: single
+            downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/llvmnosymbolszip'
+            artifactName: 'iOSSampleAppLLVMNoSymbols'
+            checkDownloadedFiles: true
 
     # Download iOSNativeAOT tests
-    - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT') }}: 
-      - template: /eng/pipelines/common/download-artifact-step.yml
-        parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols
-          cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppSymbols.zip'
-          artifactName: 'iOSSampleAppSymbols'
-          displayName: 'iOS Sample App Symbols'
-      - template: /eng/pipelines/common/download-artifact-step.yml
-        parameters:
-          unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols
-          cleanUnpackFolder: false
-          artifactFileName: 'iOSSampleAppNoSymbols.zip'
-          artifactName: 'iOSSampleAppNoSymbols'
-          displayName: 'iOS Sample App NoSymbols'
+    - ${{ if eq(parameters.runtimeType, 'iOSNativeAOT') }}:
+      - ${{ if eq(parameters.iOSStripSymbols, 'False') }}:
+        - template: /eng/pipelines/common/download-artifact-step.yml
+          parameters:
+            unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/symbols
+            cleanUnpackFolder: false
+            artifactFileName: 'iOSSampleAppSymbols.zip'
+            artifactName: 'iOSSampleAppSymbols'
+            displayName: 'iOS Sample App Symbols'
       # same artifact as above but don't extract .zip
       - task: DownloadBuildArtifacts@0
         displayName: 'Download iOS Sample App Symbols'
@@ -320,15 +318,23 @@ jobs:
           downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/symbols'
           artifactName: 'iOSSampleAppSymbols'
           checkDownloadedFiles: true
-      # same artifact as above but don't extract .zip
-      - task: DownloadBuildArtifacts@0
-        displayName: 'Download iOS Sample App NoSymbols'
-        inputs:
-          buildType: current
-          downloadType: single
-          downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols'
-          artifactName: 'iOSSampleAppNoSymbols'
-          checkDownloadedFiles: true
+      - ${{ if eq(parameters.iOSStripSymbols, 'True') }}:
+        - template: /eng/pipelines/common/download-artifact-step.yml
+          parameters:
+            unpackFolder: $(Build.SourcesDirectory)/iosHelloWorld/nosymbols
+            cleanUnpackFolder: false
+            artifactFileName: 'iOSSampleAppNoSymbols.zip'
+            artifactName: 'iOSSampleAppNoSymbols'
+            displayName: 'iOS Sample App NoSymbols'
+        # same artifact as above but don't extract .zip
+        - task: DownloadBuildArtifacts@0
+          displayName: 'Download iOS Sample App NoSymbols'
+          inputs:
+            buildType: current
+            downloadType: single
+            downloadPath: '$(Build.SourcesDirectory)/iosHelloWorldZip/nosymbols'
+            artifactName: 'iOSSampleAppNoSymbols'
+            checkDownloadedFiles: true
 
     # Create Core_Root
     - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(buildConfig) $(archType) generatelayoutonly $(librariesOverrideArg) $(_crossBuildPropertyArg)

From d26ac4fdb741986374fe6d6672f9720dac68b951 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 30 May 2023 09:37:57 +0200
Subject: [PATCH 55/57] Fix NativeAOT zip path

---
 eng/testing/performance/performance-setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 203d14f2c1bf0d..3c64e65aa7a3a5 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -481,11 +481,11 @@ if [[ "$iosnativeaot" == "true" ]]; then
   if [[ "$iosstripsymbols" == "True" ]]; then
     # NoSymbols Mono .app
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/nosymbols $payload_directory/iosHelloWorld
-    mkdir -p $payload_directory/iosHelloWorldZip/nosymbols && cp -rv $source_directory/iosHelloWorldZip/nosymbols $payload_directory/iosHelloWorldZip
+    mkdir -p $payload_directory/iosHelloWorldZip/nosymbolszip && cp -rv $source_directory/iosHelloWorldZip/nosymbolszip $payload_directory/iosHelloWorldZip
   else
     # NoSymbols Mono .app
     mkdir -p $payload_directory/iosHelloWorld && cp -rv $source_directory/iosHelloWorld/symbols $payload_directory/iosHelloWorld
-    mkdir -p $payload_directory/iosHelloWorldZip/symbols && cp -rv $source_directory/iosHelloWorldZip/symbols $payload_directory/iosHelloWorldZip
+    mkdir -p $payload_directory/iosHelloWorldZip/symbolszip && cp -rv $source_directory/iosHelloWorldZip/symbolszip $payload_directory/iosHelloWorldZip
   fi
 fi
 

From d33a9069b8fc7ce89c7450cedb55abf8c70c90e2 Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 30 May 2023 12:29:37 +0200
Subject: [PATCH 56/57] Enable other perf jobs

---
 eng/pipelines/coreclr/perf-non-wasm-jobs.yml | 596 +++++++++----------
 eng/pipelines/coreclr/perf.yml               |  14 +-
 2 files changed, 305 insertions(+), 305 deletions(-)

diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index c9f5b62127489d..e926a63f532da3 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -1,84 +1,84 @@
 jobs:
 
-# - ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+- ${{ if and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
 
-#   # build mono
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-#       runtimeFlavor: mono
-#       buildConfig: release
-#       platforms:
-#       - linux_x64
+  # build mono
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+      runtimeFlavor: mono
+      buildConfig: release
+      platforms:
+      - linux_x64
 
-#   # build coreclr and libraries
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-#       buildConfig: release
-#       platforms:
-#       - linux_x64
-#       jobParameters:
-#         testGroup: perf
+  # build coreclr and libraries
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+      buildConfig: release
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
 
-# - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
 
-#   # build coreclr and libraries
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
-#       buildConfig: release
-#       platforms:
-#       - linux_x64
-#       - windows_x64
-#       - windows_x86
-#       - linux_musl_x64
-#       jobParameters:
-#         testGroup: perf
+  # build coreclr and libraries
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+      buildConfig: release
+      platforms:
+      - linux_x64
+      - windows_x64
+      - windows_x86
+      - linux_musl_x64
+      jobParameters:
+        testGroup: perf
 
-#   # build mono for AOT
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/global-build-job.yml
-#       buildConfig: release
-#       runtimeFlavor: mono
-#       platforms:
-#       - linux_x64
-#       jobParameters:
-#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-#         nameSuffix: AOT
-#         isOfficialBuild: false
-#         extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
-#         extraStepsParameters:
-#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-#           includeRootFolder: true
-#           displayName: AOT Mono Artifacts
-#           artifactName: LinuxMonoAOTx64
-#           archiveExtension: '.tar.gz'
-#           archiveType: tar
-#           tarCompression: gz
+  # build mono for AOT
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - linux_x64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: AOT
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/common/upload-artifact-step.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: AOT Mono Artifacts
+          artifactName: LinuxMonoAOTx64
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
 
-#   # build mono Android scenarios
-#   - template: /eng/pipelines/common/platform-matrix.yml
-#     parameters:
-#       jobTemplate: /eng/pipelines/common/global-build-job.yml
-#       buildConfig: release
-#       runtimeFlavor: mono
-#       platforms:
-#       - android_arm64
-#       jobParameters:
-#         buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-#         nameSuffix: AndroidMono
-#         isOfficialBuild: false
-#         extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
-#         extraStepsParameters:
-#           rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-#           includeRootFolder: true
-#           displayName: Android Mono Artifacts
-#           artifactName: AndroidMonoarm64
-#           archiveExtension: '.tar.gz'
-#           archiveType: tar
-#           tarCompression: gz
+  # build mono Android scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - android_arm64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: AndroidMono
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-sample-apps.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: Android Mono Artifacts
+          artifactName: AndroidMonoarm64
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
 
   # build mono iOS scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -123,30 +123,30 @@ jobs:
           archiveType: tar
           tarCompression: gz
 
-  # # build mono
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/mono/templates/build-job.yml
-  #     runtimeFlavor: mono
-  #     buildConfig: release
-  #     platforms:
-  #     - linux_x64
+  # build mono
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/mono/templates/build-job.yml
+      runtimeFlavor: mono
+      buildConfig: release
+      platforms:
+      - linux_x64
 
-  # # run android scenarios
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #       - windows_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       runtimeType: AndroidMono
-  #       projectFile: android_scenarios.proj
-  #       runKind: android_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perfpixel4a'
+  # run android scenarios
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+        - windows_x64
+      jobParameters:
+        testGroup: perf
+        runtimeType: AndroidMono
+        projectFile: android_scenarios.proj
+        runKind: android_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perfpixel4a'
 
   # run mono iOS scenarios scenarios
   - template: /eng/pipelines/common/platform-matrix.yml
@@ -250,216 +250,216 @@ jobs:
         logicalmachine: 'perfiphone12mini'
         iOSStripSymbols: True
 
-  # # run mono microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       runtimeType: mono
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro_mono
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run mono microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        runtimeType: mono
+        projectFile: microbenchmarks.proj
+        runKind: micro_mono
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run mono interpreter perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       runtimeType: mono
-  #       codeGenType: 'Interpreter'
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro_mono
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run mono interpreter perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        runtimeType: mono
+        codeGenType: 'Interpreter'
+        projectFile: microbenchmarks.proj
+        runKind: micro_mono
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run mono aot microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
-  #     buildConfig: release
-  #     runtimeFlavor: aot
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       runtimeType: mono
-  #       codeGenType: 'AOT'
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro_mono
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run mono aot microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml # NOTE: should we move this file out of coreclr tempelates because it contains mono jobs?
+      buildConfig: release
+      runtimeFlavor: aot
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        runtimeType: mono
+        codeGenType: 'AOT'
+        projectFile: microbenchmarks.proj
+        runKind: micro_mono
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run coreclr perftiger microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     - windows_x64
-  #     - windows_x86
-  #     - linux_musl_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
+  # run coreclr perftiger microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      - windows_x64
+      - windows_x86
+      - linux_musl_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
 
-  # # run coreclr perftiger microbenchmarks pgo 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'
-  #       pgoRunType: -NoPgo
+  # run coreclr perftiger microbenchmarks pgo 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'
+        pgoRunType: -NoPgo
 
-  # - 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'
-  #       pgoRunType: -DynamicPgo
+  - 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'
+        pgoRunType: -DynamicPgo
 
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perftiger'
-  #       pgoRunType: --dynamicpgo
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perftiger'
+        pgoRunType: --dynamicpgo
 
-  # - 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'
-  #       pgoRunType: -FullPgo
+  - 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'
+        pgoRunType: -FullPgo
 
-  # # run coreclr perfowl microbenchmarks perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     - windows_x64
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: microbenchmarks.proj
-  #       runKind: micro
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
-  #       logicalmachine: 'perfowl'
+  # run coreclr perfowl microbenchmarks perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      - windows_x64
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: microbenchmarks.proj
+        runKind: micro
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml
+        logicalmachine: 'perfowl'
 
-  # # run coreclr crossgen perf job
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: coreclr
-  #     platforms:
-  #     - linux_x64
-  #     - windows_x64
-  #     - windows_x86
-  #     jobParameters:
-  #       testGroup: perf
-  #       liveLibrariesBuildConfig: Release
-  #       projectFile: crossgen_perf.proj
-  #       runKind: crossgen_scenarios
-  #       runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
-  #       logicalmachine: 'perftiger'
+  # run coreclr crossgen perf job
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml
+      buildConfig: release
+      runtimeFlavor: coreclr
+      platforms:
+      - linux_x64
+      - windows_x64
+      - windows_x86
+      jobParameters:
+        testGroup: perf
+        liveLibrariesBuildConfig: Release
+        projectFile: crossgen_perf.proj
+        runKind: crossgen_scenarios
+        runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
+        logicalmachine: 'perftiger'
 
-  # # build mono runtime packs
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - android_arm64
-  #     jobParameters:
-  #       buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
-  #       nameSuffix: Mono_Packs
-  #       isOfficialBuild: false
-  #       extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
-  #       extraStepsParameters:
-  #         name: MonoRuntimePacks
+  # build mono runtime packs
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - android_arm64
+      jobParameters:
+        buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
+        nameSuffix: Mono_Packs
+        isOfficialBuild: false
+        extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
+        extraStepsParameters:
+          name: MonoRuntimePacks
 
-  # # build PerfBDN app
-  # - template: /eng/pipelines/common/platform-matrix.yml
-  #   parameters:
-  #     jobTemplate: /eng/pipelines/common/global-build-job.yml
-  #     buildConfig: release
-  #     runtimeFlavor: mono
-  #     platforms:
-  #     - ios_arm64
-  #     jobParameters:
-  #       dependsOn:
-  #        - Build_android_arm64_release_Mono_Packs
-  #       buildArgs: -s mono -c $(_BuildConfig)
-  #       nameSuffix: PerfBDNApp
-  #       isOfficialBuild: false
-  #       pool:
-  #         vmImage: 'macos-12'
-  #       extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
-  #       extraStepsParameters:
-  #         rootFolder: '$(Build.SourcesDirectory)/artifacts/'
-  #         includeRootFolder: true
-  #         displayName: Android BDN App Artifacts
-  #         artifactName: PerfBDNAppArm
-  #         archiveExtension: '.tar.gz'
-  #         archiveType: tar
-  #         tarCompression: gz
+  # build PerfBDN app
+  - template: /eng/pipelines/common/platform-matrix.yml
+    parameters:
+      jobTemplate: /eng/pipelines/common/global-build-job.yml
+      buildConfig: release
+      runtimeFlavor: mono
+      platforms:
+      - ios_arm64
+      jobParameters:
+        dependsOn:
+         - Build_android_arm64_release_Mono_Packs
+        buildArgs: -s mono -c $(_BuildConfig)
+        nameSuffix: PerfBDNApp
+        isOfficialBuild: false
+        pool:
+          vmImage: 'macos-12'
+        extraStepsTemplate: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml
+        extraStepsParameters:
+          rootFolder: '$(Build.SourcesDirectory)/artifacts/'
+          includeRootFolder: true
+          displayName: Android BDN App Artifacts
+          artifactName: PerfBDNAppArm
+          archiveExtension: '.tar.gz'
+          archiveType: tar
+          tarCompression: gz
diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml
index 04e90898d76f75..ae734cbfdaa76d 100644
--- a/eng/pipelines/coreclr/perf.yml
+++ b/eng/pipelines/coreclr/perf.yml
@@ -42,12 +42,12 @@ extends:
     - stage: Build
       jobs:
 
-      # - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
-      #   parameters:
-      #     collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
-      #     ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
-      #       runProfile: 'non-v8'
-      #     ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
-      #       runProfile: 'v8'
+      - template: /eng/pipelines/coreclr/perf-wasm-jobs.yml
+        parameters:
+          collectHelixLogsScript: ${{ variables._wasmCollectHelixLogsScript }}
+          ${{ and(ne(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule')) }}:
+            runProfile: 'non-v8'
+          ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}:
+            runProfile: 'v8'
 
       - template: /eng/pipelines/coreclr/perf-non-wasm-jobs.yml

From f62f5a9c314c15bbd28666a3e68d2662920a0f3f Mon Sep 17 00:00:00 2001
From: Milos Kotlar <kotlarmilos@gmail.com>
Date: Tue, 30 May 2023 12:31:57 +0200
Subject: [PATCH 57/57] Update Mono Helix item name

---
 eng/testing/performance/ios_scenarios.proj | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eng/testing/performance/ios_scenarios.proj b/eng/testing/performance/ios_scenarios.proj
index 53b17d1228ff87..a7af7348bc1930 100644
--- a/eng/testing/performance/ios_scenarios.proj
+++ b/eng/testing/performance/ios_scenarios.proj
@@ -30,7 +30,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <HelixWorkItem Include="SOD - iOS HelloWorld .app Size $(LlvmPath) $(SymbolsPath)">
+    <HelixWorkItem Include="SOD - iOS HelloWorld Mono .app Size $(LlvmPath) $(SymbolsPath)">
       <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
       <PreCommands>cd $(ScenarioDirectory)helloios;cp -rf $HELIX_CORRELATION_PAYLOAD/iosHelloWorld/$(LlvmPath)$(SymbolsPath) ./app;$(Python) pre.py --name app</PreCommands>
       <Command>$(Python) test.py sod --scenario-name &quot;%(Identity)&quot;</Command>
