From 02beb46c0bc2d57adca49d211b1cf55cf0ecfcb5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:11:47 +0000 Subject: [PATCH 1/5] Initial plan From 3263efa6a91530b586710815bdeb139b93392aa0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:23:53 +0000 Subject: [PATCH 2/5] Add debug build configuration support for MAUI Android and iOS scenarios Co-authored-by: LoopedBard3 <15679138+LoopedBard3@users.noreply.github.com> --- eng/performance/maui_scenarios_android.proj | 2 +- eng/performance/maui_scenarios_ios.proj | 2 +- eng/pipelines/sdk-perf-jobs.yml | 158 ++++++++++++++++++++ scripts/run_performance_job.py | 11 +- test_new/Program.cs | 2 + test_new/test_new.csproj | 10 ++ 6 files changed, 181 insertions(+), 4 deletions(-) create mode 100644 test_new/Program.cs create mode 100644 test_new/test_new.csproj diff --git a/eng/performance/maui_scenarios_android.proj b/eng/performance/maui_scenarios_android.proj index 07440d846b5..3e50a517e7d 100644 --- a/eng/performance/maui_scenarios_android.proj +++ b/eng/performance/maui_scenarios_android.proj @@ -71,7 +71,7 @@ - $(Python) pre.py publish -f $(PERFLAB_Framework)-android -r android-arm64 --self-contained --msbuild="$(_MSBuildArgs)" --binlog $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName)\%(PreparePayloadWorkItem.ScenarioDirectoryName).$(RunConfigsString).binlog -o $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName) + $(Python) pre.py publish -f $(PERFLAB_Framework)-android -r android-arm64 --self-contained -c $(BuildConfig) --msbuild="$(_MSBuildArgs)" --binlog $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName)\%(PreparePayloadWorkItem.ScenarioDirectoryName).$(RunConfigsString).binlog -o $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName) %(PreparePayloadWorkItem.PayloadDirectory) diff --git a/eng/performance/maui_scenarios_ios.proj b/eng/performance/maui_scenarios_ios.proj index d6fc88576b7..60ae680f724 100644 --- a/eng/performance/maui_scenarios_ios.proj +++ b/eng/performance/maui_scenarios_ios.proj @@ -48,7 +48,7 @@ - sudo xcode-select -s /Applications/Xcode_26.0.1.app; $(Python) pre.py publish -f $(PERFLAB_Framework)-ios --self-contained -c Release -r ios-arm64 $(NativeAOTCommandProps) --binlog $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName)/%(PreparePayloadWorkItem.ScenarioDirectoryName).binlog -o $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName); cd ../; zip -r %(PreparePayloadWorkItem.ScenarioDirectoryName).zip %(PreparePayloadWorkItem.ScenarioDirectoryName) + sudo xcode-select -s /Applications/Xcode_26.0.1.app; $(Python) pre.py publish -f $(PERFLAB_Framework)-ios --self-contained -c $(BuildConfig) -r ios-arm64 $(NativeAOTCommandProps) --binlog $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName)/%(PreparePayloadWorkItem.ScenarioDirectoryName).binlog -o $(PreparePayloadWorkItemBaseDirectory)%(PreparePayloadWorkItem.ScenarioDirectoryName); cd ../; zip -r %(PreparePayloadWorkItem.ScenarioDirectoryName).zip %(PreparePayloadWorkItem.ScenarioDirectoryName) %(PreparePayloadWorkItem.PayloadDirectory) diff --git a/eng/pipelines/sdk-perf-jobs.yml b/eng/pipelines/sdk-perf-jobs.yml index fee950398de..d9a3b556f4a 100644 --- a/eng/pipelines/sdk-perf-jobs.yml +++ b/eng/pipelines/sdk-perf-jobs.yml @@ -525,6 +525,164 @@ jobs: ${{ each parameter in parameters.jobParameters }}: ${{ parameter.key }}: ${{ parameter.value }} + # Maui Android Debug scenario benchmarks (Mono ProfiledAOT) + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - win-x64-android-arm64-pixel + - win-x64-android-arm64-galaxy + isPublic: false + jobParameters: + runKind: maui_scenarios_android + projectFileName: maui_scenarios_android.proj + channels: + - main + runtimeFlavor: mono + codeGenType: ProfiledAOT + buildConfig: debug + additionalJobIdentifier: Mono_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui Android Debug scenario benchmarks (Mono AOT) + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - win-x64-android-arm64-pixel + - win-x64-android-arm64-galaxy + isPublic: false + jobParameters: + runKind: maui_scenarios_android + projectFileName: maui_scenarios_android.proj + channels: + - main + runtimeFlavor: mono + codeGenType: AOT + buildConfig: debug + additionalJobIdentifier: Mono_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui Android Debug scenario benchmarks (CoreCLR JIT) + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - win-x64-android-arm64-pixel + - win-x64-android-arm64-galaxy + isPublic: false + jobParameters: + runKind: maui_scenarios_android + projectFileName: maui_scenarios_android.proj + channels: + - main + runtimeFlavor: coreclr + codeGenType: JIT + buildConfig: debug + additionalJobIdentifier: CoreCLR_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui Android Debug scenario benchmarks (CoreCLR R2R) + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - win-x64-android-arm64-pixel + - win-x64-android-arm64-galaxy + isPublic: false + jobParameters: + runKind: maui_scenarios_android + projectFileName: maui_scenarios_android.proj + channels: + - main + runtimeFlavor: coreclr + codeGenType: R2R + buildConfig: debug + additionalJobIdentifier: CoreCLR_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui Android Debug scenario benchmarks (CoreCLR R2R Composite) + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - win-x64-android-arm64-pixel + - win-x64-android-arm64-galaxy + isPublic: false + jobParameters: + runKind: maui_scenarios_android + projectFileName: maui_scenarios_android.proj + channels: + - main + runtimeFlavor: coreclr + codeGenType: R2RComposite + buildConfig: debug + additionalJobIdentifier: CoreCLR_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui Android Debug scenario benchmarks (CoreCLR NativeAOT) + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - win-x64-android-arm64-pixel + - win-x64-android-arm64-galaxy + isPublic: false + jobParameters: + runKind: maui_scenarios_android + projectFileName: maui_scenarios_android.proj + channels: + - main + runtimeFlavor: coreclr + codeGenType: NativeAOT + buildConfig: debug + additionalJobIdentifier: CoreCLR_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui iOS Debug Mono scenario benchmarks + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - osx-x64-ios-arm64 + isPublic: false + jobParameters: + runKind: maui_scenarios_ios + projectFileName: maui_scenarios_ios.proj + channels: + - main + runtimeFlavor: mono + codeGenType: FullAOT + buildConfig: debug + additionalJobIdentifier: Mono_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # Maui iOS Debug Native AOT scenario benchmarks + - template: /eng/pipelines/templates/build-machine-matrix.yml + parameters: + jobTemplate: /eng/pipelines/templates/run-scenarios-job.yml + buildMachines: + - osx-x64-ios-arm64 + isPublic: false + jobParameters: + runKind: maui_scenarios_ios + projectFileName: maui_scenarios_ios.proj + channels: + - main + runtimeFlavor: coreclr + codeGenType: NativeAOT + buildConfig: debug + additionalJobIdentifier: CoreCLR_Debug + ${{ each parameter in parameters.jobParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + # Maui scenario benchmarks - ${{ if false }}: - template: /eng/pipelines/templates/build-machine-matrix.yml diff --git a/scripts/run_performance_job.py b/scripts/run_performance_job.py index e8b955bcac4..747d68682b8 100644 --- a/scripts/run_performance_job.py +++ b/scripts/run_performance_job.py @@ -434,7 +434,8 @@ def get_run_configurations( runtime_flavor: Optional[str] = None, ios_llvm_build: bool = False, ios_strip_symbols: bool = False, - javascript_engine: Optional[str] = None): + javascript_engine: Optional[str] = None, + build_config: Optional[str] = None): configurations = { "CompilationMode": "Tiered", "RunKind": run_kind } @@ -490,6 +491,8 @@ def get_run_configurations( raise Exception("Runtime flavor must be specified for maui_scenarios_android") configurations["CodegenType"] = str(codegen_type) configurations["RuntimeType"] = str(runtime_flavor) + if build_config is not None: + configurations["BuildConfig"] = str(build_config) # .NET iOS and .NET MAUI iOS sample app scenarios if run_kind == "maui_scenarios_ios": @@ -497,6 +500,8 @@ def get_run_configurations( raise Exception("Runtime flavor must be specified for maui_scenarios_ios") configurations["CodegenType"] = str(codegen_type) configurations["RuntimeType"] = str(runtime_flavor) + if build_config is not None: + configurations["BuildConfig"] = str(build_config) return configurations @@ -656,7 +661,8 @@ def run_performance_job(args: RunPerformanceJobArgs): configurations = get_run_configurations( args.run_kind, args.runtime_type, args.codegen_type, args.pgo_run_type, args.physical_promotion_run_type, args.r2r_run_type, args.experiment_name, args.linking_type, - args.runtime_flavor, args.ios_llvm_build, args.ios_strip_symbols, args.javascript_engine + args.runtime_flavor, args.ios_llvm_build, args.ios_strip_symbols, args.javascript_engine, + args.build_config ) ci_setup_arguments = ci_setup.CiSetupArgs( @@ -1007,6 +1013,7 @@ def publish_dotnet_app_to_payload(payload_dir_name: str, csproj_path: str, self_ os.environ["Python"] = agent_python os.environ["RuntimeFlavor"] = args.runtime_flavor or '' os.environ["CodegenType"] = args.codegen_type or '' + os.environ["BuildConfig"] = args.build_config or 'Release' # TODO: See if these commands are needed for linux as they were being called before but were failing. if args.os_group == "windows" or args.os_group == "osx": diff --git a/test_new/Program.cs b/test_new/Program.cs new file mode 100644 index 00000000000..3751555cbd3 --- /dev/null +++ b/test_new/Program.cs @@ -0,0 +1,2 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); diff --git a/test_new/test_new.csproj b/test_new/test_new.csproj new file mode 100644 index 00000000000..ed9781c223a --- /dev/null +++ b/test_new/test_new.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + + From 38b5e3198418af17764cb0ee500f3fbbfe15dabd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:24:22 +0000 Subject: [PATCH 3/5] Remove test_new directory that was accidentally committed Co-authored-by: LoopedBard3 <15679138+LoopedBard3@users.noreply.github.com> --- test_new/Program.cs | 2 -- test_new/test_new.csproj | 10 ---------- 2 files changed, 12 deletions(-) delete mode 100644 test_new/Program.cs delete mode 100644 test_new/test_new.csproj diff --git a/test_new/Program.cs b/test_new/Program.cs deleted file mode 100644 index 3751555cbd3..00000000000 --- a/test_new/Program.cs +++ /dev/null @@ -1,2 +0,0 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); diff --git a/test_new/test_new.csproj b/test_new/test_new.csproj deleted file mode 100644 index ed9781c223a..00000000000 --- a/test_new/test_new.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net10.0 - enable - enable - - - From a0bf6bbf17318730051ca9b3b1c62cf10df7eaed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:26:19 +0000 Subject: [PATCH 4/5] Fix code review feedback: use dataclass default for build_config Co-authored-by: LoopedBard3 <15679138+LoopedBard3@users.noreply.github.com> --- scripts/run_performance_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_performance_job.py b/scripts/run_performance_job.py index 747d68682b8..aa610e2dd55 100644 --- a/scripts/run_performance_job.py +++ b/scripts/run_performance_job.py @@ -1013,7 +1013,7 @@ def publish_dotnet_app_to_payload(payload_dir_name: str, csproj_path: str, self_ os.environ["Python"] = agent_python os.environ["RuntimeFlavor"] = args.runtime_flavor or '' os.environ["CodegenType"] = args.codegen_type or '' - os.environ["BuildConfig"] = args.build_config or 'Release' + os.environ["BuildConfig"] = args.build_config # TODO: See if these commands are needed for linux as they were being called before but were failing. if args.os_group == "windows" or args.os_group == "osx": From b79a9bbfbbae9acd567f03892c75a0fdbac91b27 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:31:43 +0000 Subject: [PATCH 5/5] Address code review feedback: add DEFAULT_BUILD_CONFIG constant and remove unnecessary str() conversions Co-authored-by: LoopedBard3 <15679138+LoopedBard3@users.noreply.github.com> --- scripts/run_performance_job.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/run_performance_job.py b/scripts/run_performance_job.py index aa610e2dd55..49421aba9bd 100644 --- a/scripts/run_performance_job.py +++ b/scripts/run_performance_job.py @@ -20,6 +20,8 @@ from performance.logger import setup_loggers from send_to_helix import PerfSendToHelixArgs, perf_send_to_helix +DEFAULT_BUILD_CONFIG = "Release" + def output_counters_for_crank(reports: list[Any]): print("#StartJobStatistics") @@ -112,7 +114,7 @@ class RunPerformanceJobArgs: os_version: Optional[str] = None dotnet_version_link: Optional[str] = None target_csproj: Optional[str] = None - build_config: str = "Release" + build_config: str = DEFAULT_BUILD_CONFIG live_libraries_build_config: Optional[str] = None cross_build: bool = False @@ -492,7 +494,7 @@ def get_run_configurations( configurations["CodegenType"] = str(codegen_type) configurations["RuntimeType"] = str(runtime_flavor) if build_config is not None: - configurations["BuildConfig"] = str(build_config) + configurations["BuildConfig"] = build_config # .NET iOS and .NET MAUI iOS sample app scenarios if run_kind == "maui_scenarios_ios": @@ -501,7 +503,7 @@ def get_run_configurations( configurations["CodegenType"] = str(codegen_type) configurations["RuntimeType"] = str(runtime_flavor) if build_config is not None: - configurations["BuildConfig"] = str(build_config) + configurations["BuildConfig"] = build_config return configurations @@ -1013,7 +1015,7 @@ def publish_dotnet_app_to_payload(payload_dir_name: str, csproj_path: str, self_ os.environ["Python"] = agent_python os.environ["RuntimeFlavor"] = args.runtime_flavor or '' os.environ["CodegenType"] = args.codegen_type or '' - os.environ["BuildConfig"] = args.build_config + os.environ["BuildConfig"] = args.build_config or DEFAULT_BUILD_CONFIG # TODO: See if these commands are needed for linux as they were being called before but were failing. if args.os_group == "windows" or args.os_group == "osx":