diff --git a/eng/pipelines/coreclr/superpmi-collect.yml b/eng/pipelines/coreclr/superpmi-collect.yml index ea5b57d5f51df2..cb495315764927 100644 --- a/eng/pipelines/coreclr/superpmi-collect.yml +++ b/eng/pipelines/coreclr/superpmi-collect.yml @@ -39,7 +39,7 @@ extends: buildConfig: checked platforms: - windows_x64 - - linux_x64 + # - linux_x64 jobParameters: testGroup: outerloop buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true @@ -68,87 +68,87 @@ extends: testGroup: outerloop disableComponentGovernance: true # No shipping artifacts produced by this pipeline - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - windows_x86 - - windows_arm64 - - osx_arm64 - jobParameters: - testGroup: outerloop - buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true - timeoutInMinutes: 120 - postBuildSteps: - # Build CLR assets for x64 as well as the target as we need an x64 mcs - - template: /eng/pipelines/common/templates/global-build-step.yml - parameters: - buildArgs: -s clr.spmi -c $(_BuildConfig) - archParameter: -arch x64 - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: outerloop - disableComponentGovernance: true # No shipping artifacts produced by this pipeline + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/common/global-build-job.yml + # buildConfig: checked + # platforms: + # - windows_x86 + # - windows_arm64 + # - osx_arm64 + # jobParameters: + # testGroup: outerloop + # buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true + # timeoutInMinutes: 120 + # postBuildSteps: + # # Build CLR assets for x64 as well as the target as we need an x64 mcs + # - template: /eng/pipelines/common/templates/global-build-step.yml + # parameters: + # buildArgs: -s clr.spmi -c $(_BuildConfig) + # archParameter: -arch x64 + # - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + # - template: /eng/pipelines/common/upload-artifact-step.yml + # parameters: + # rootFolder: $(Build.SourcesDirectory)/artifacts/bin + # includeRootFolder: false + # archiveType: $(archiveType) + # archiveExtension: $(archiveExtension) + # tarCompression: $(tarCompression) + # artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + # - template: /eng/pipelines/common/upload-artifact-step.yml + # parameters: + # rootFolder: $(Build.SourcesDirectory)/artifacts/helix + # includeRootFolder: false + # archiveType: $(archiveType) + # archiveExtension: $(archiveExtension) + # tarCompression: $(tarCompression) + # artifactName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + # extraVariablesTemplates: + # - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + # parameters: + # testGroup: outerloop + # disableComponentGovernance: true # No shipping artifacts produced by this pipeline - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - linux_arm - - linux_arm64 - jobParameters: - testGroup: outerloop - buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true - timeoutInMinutes: 120 - postBuildSteps: - # Build CLR assets for x64 as well as the target as we need an x64 mcs - - template: /eng/pipelines/common/templates/global-build-step.yml - parameters: - buildArgs: -s clr.spmi -c $(_BuildConfig) - archParameter: -arch x64 - container: linux_x64 - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: outerloop - disableComponentGovernance: true # No shipping artifacts produced by this pipeline + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/common/global-build-job.yml + # buildConfig: checked + # platforms: + # - linux_arm + # - linux_arm64 + # jobParameters: + # testGroup: outerloop + # buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true + # timeoutInMinutes: 120 + # postBuildSteps: + # # Build CLR assets for x64 as well as the target as we need an x64 mcs + # - template: /eng/pipelines/common/templates/global-build-step.yml + # parameters: + # buildArgs: -s clr.spmi -c $(_BuildConfig) + # archParameter: -arch x64 + # container: linux_x64 + # - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + # - template: /eng/pipelines/common/upload-artifact-step.yml + # parameters: + # rootFolder: $(Build.SourcesDirectory)/artifacts/bin + # includeRootFolder: false + # archiveType: $(archiveType) + # archiveExtension: $(archiveExtension) + # tarCompression: $(tarCompression) + # artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + # - template: /eng/pipelines/common/upload-artifact-step.yml + # parameters: + # rootFolder: $(Build.SourcesDirectory)/artifacts/helix + # includeRootFolder: false + # archiveType: $(archiveType) + # archiveExtension: $(archiveExtension) + # tarCompression: $(tarCompression) + # artifactName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + # extraVariablesTemplates: + # - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + # parameters: + # testGroup: outerloop + # disableComponentGovernance: true # No shipping artifacts produced by this pipeline - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -159,224 +159,238 @@ extends: jobParameters: testGroup: outerloop - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: ci - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - collectionType: pmi - collectionName: libraries + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: pmi + # collectionName: libraries - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: ci - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - collectionType: crossgen2 - collectionName: libraries + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: crossgen2 + # collectionName: libraries - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: ci - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - collectionType: run - collectionName: realworld + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: run + # collectionName: realworld + + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: run + # collectionName: benchmarks - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml buildConfig: checked platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - windows_x64 - - windows_x86 - - windows_arm64 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml jobParameters: testGroup: outerloop liveLibrariesBuildConfig: Release collectionType: run - collectionName: benchmarks + collectionName: aspnet - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: ci - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - collectionType: run_tiered - collectionName: benchmarks + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: run_tiered + # collectionName: benchmarks - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: ci - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - collectionType: run_pgo - collectionName: benchmarks + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: run_pgo + # collectionName: benchmarks - # - # Collection of coreclr test run - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: superpmi - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - SuperPmiCollect: true - unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + # # + # # Collection of coreclr test run + # # + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + # buildConfig: checked + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: superpmi + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # SuperPmiCollect: true + # unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml - buildConfig: checked - platforms: - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_arm64 - helixQueueGroup: ci - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: outerloop - liveLibrariesBuildConfig: Release - collectionType: nativeaot - collectionName: smoke_tests + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/coreclr/templates/superpmi-collect-job.yml + # buildConfig: checked + # platforms: + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_arm64 + # helixQueueGroup: ci + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testGroup: outerloop + # liveLibrariesBuildConfig: Release + # collectionType: nativeaot + # collectionName: smoke_tests - # - # Collection of libraries test run: normal - # Libraries Test Run using Release libraries, and Checked CoreCLR - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: Release - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: superpmi - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: Checked - dependsOnTestBuildConfiguration: Release - dependsOnTestArchitecture: x64 - scenarios: - - normal - SuperPmiCollect: true - SuperPmiCollectionName: libraries_tests - unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked - helixArtifactsName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked - unifiedBuildConfigOverride: checked + # # + # # Collection of libraries test run: normal + # # Libraries Test Run using Release libraries, and Checked CoreCLR + # # + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/libraries/run-test-job.yml + # buildConfig: Release + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: superpmi + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testScope: innerloop + # liveRuntimeBuildConfig: Checked + # dependsOnTestBuildConfiguration: Release + # dependsOnTestArchitecture: x64 + # scenarios: + # - normal + # SuperPmiCollect: true + # SuperPmiCollectionName: libraries_tests + # unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked + # helixArtifactsName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked + # unifiedBuildConfigOverride: checked - # - # Collection of libraries test run: no_tiered_compilation - # Libraries Test Run using Release libraries, and Checked CoreCLR - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: Release - platforms: - - osx_arm64 - - linux_arm - - linux_arm64 - - linux_x64 - - windows_x64 - - windows_x86 - - windows_arm64 - helixQueueGroup: superpmi - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: Checked - dependsOnTestBuildConfiguration: Release - dependsOnTestArchitecture: x64 - scenarios: - - no_tiered_compilation - SuperPmiCollect: true - SuperPmiCollectionName: libraries_tests_no_tiered_compilation - unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked - helixArtifactsName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked - unifiedBuildConfigOverride: checked + # # + # # Collection of libraries test run: no_tiered_compilation + # # Libraries Test Run using Release libraries, and Checked CoreCLR + # # + # - template: /eng/pipelines/common/platform-matrix.yml + # parameters: + # jobTemplate: /eng/pipelines/libraries/run-test-job.yml + # buildConfig: Release + # platforms: + # - osx_arm64 + # - linux_arm + # - linux_arm64 + # - linux_x64 + # - windows_x64 + # - windows_x86 + # - windows_arm64 + # helixQueueGroup: superpmi + # helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + # jobParameters: + # testScope: innerloop + # liveRuntimeBuildConfig: Checked + # dependsOnTestBuildConfiguration: Release + # dependsOnTestArchitecture: x64 + # scenarios: + # - no_tiered_compilation + # SuperPmiCollect: true + # SuperPmiCollectionName: libraries_tests_no_tiered_compilation + # unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked + # helixArtifactsName: LibrariesTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked + # unifiedBuildConfigOverride: checked diff --git a/src/coreclr/scripts/jitutil.py b/src/coreclr/scripts/jitutil.py index b397cecdc53b86..a7fa1f851d450d 100644 --- a/src/coreclr/scripts/jitutil.py +++ b/src/coreclr/scripts/jitutil.py @@ -179,7 +179,6 @@ def run_command(command_to_run, _cwd=None, _exit_on_fail=False, _output_file=Non sys.exit(1) return command_stdout, command_stderr, return_code - def copy_directory(src_path, dst_path, verbose_output=False, verbose_copy=False, verbose_skip=False, match_func=lambda path: True): """Copies directory in 'src_path' to 'dst_path' maintaining the directory structure. https://docs.python.org/3.5/library/shutil.html#shutil.copytree can't diff --git a/src/coreclr/scripts/superpmi-collect.proj b/src/coreclr/scripts/superpmi-collect.proj index 00d0a89da206b9..9a26d218e0b383 100644 --- a/src/coreclr/scripts/superpmi-collect.proj +++ b/src/coreclr/scripts/superpmi-collect.proj @@ -84,6 +84,15 @@ $HELIX_WORKITEM_PAYLOAD/performance + + + + %HELIX_WORKITEM_PAYLOAD%\aspnet + + + $HELIX_WORKITEM_PAYLOAD/aspnet + + @@ -145,6 +154,11 @@ 3:00 + + $(Python) $(SuperPMIDirectory)$(FileSeparatorChar)superpmi_aspnet.py -core_root_directory $(SuperPMIDirectory) -arch $(Architecture) -temp_location $(AspNetDirectory) --local + 3:00 + + false false @@ -194,7 +208,7 @@ - + @@ -261,7 +275,20 @@ - + + + 1 + src\Benchmarks\Benchmarks.csproj + Benchmarks.dll + + + 1 + src/Benchmarks/Benchmarks.csproj + Benchmarks.dll + + + + @@ -292,4 +319,14 @@ %(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log + + + + $(CollectionName).$(CollectionType).%(HelixWorkItem.Index).$(MchFileTag) + $(WorkItemDirectory) + $(WorkItemCommand) -output_mch_path $(OutputMchPath)$(FileSeparatorChar)%(OutputFileName).mch + $(WorkItemTimeout) + %(OutputFileName).mch;%(OutputFileName).mch.mct;%(OutputFileName).log + + diff --git a/src/coreclr/scripts/superpmi_aspnet.py b/src/coreclr/scripts/superpmi_aspnet.py index 8125184104ea47..44a7c2a21f4ffc 100644 --- a/src/coreclr/scripts/superpmi_aspnet.py +++ b/src/coreclr/scripts/superpmi_aspnet.py @@ -18,6 +18,9 @@ import zipfile import stat import tempfile +import time +import threading +import multiprocessing from os import path from coreclr_arguments import * @@ -28,9 +31,11 @@ is_windows = platform.system() == "Windows" parser = argparse.ArgumentParser(description="description") -parser.add_argument("-source_directory", help="path to source directory") +parser.add_argument("-core_root_directory", required=True, help="Path to Core_Root directory") parser.add_argument("-output_mch_path", help="Absolute path to the mch file to produce") parser.add_argument("-arch", help="Architecture") +parser.add_argument("-temp_location", required=False, help="Location to temporarily download ASPNET benchmarks and crank") +parser.add_argument("--local", action="store_true", default=False) def setup_args(args): """ Setup the args for SuperPMI to use. @@ -42,13 +47,13 @@ def setup_args(args): args (CoreclrArguments) """ - coreclr_args = CoreclrArguments(args, require_built_core_root=True, require_built_product_dir=True, + coreclr_args = CoreclrArguments(args, require_built_core_root=False, require_built_product_dir=False, require_built_test_dir=False, default_build_type="Checked") coreclr_args.verify(args, - "source_directory", - lambda source_directory: os.path.isdir(source_directory), - "source_directory doesn't exist") + "core_root_directory", + lambda core_root_directory: os.path.isdir(core_root_directory), + "core_root_directory doesn't exist") coreclr_args.verify(args, "output_mch_path", @@ -59,6 +64,15 @@ def setup_args(args): "arch", lambda arch: arch.lower() in ["x64", "arm64"], "Unable to set arch") + + if args.temp_location: + coreclr_args.temp_location = args.temp_location + coreclr_args.temp_is_explicit = True + else: + coreclr_args.temp_location = tempfile.TemporaryDirectory().name + coreclr_args.temp_is_explicit = False + + coreclr_args.local = args.local return coreclr_args @@ -119,120 +133,139 @@ def build_and_run(coreclr_args): coreclr_args (CoreClrArguments): Arguments use to drive output_mch_name (string): Name of output mch file name """ - source_directory = coreclr_args.source_directory + coreclr_args.core_root = coreclr_args.core_root_directory + core_root_directory = coreclr_args.core_root_directory target_arch = coreclr_args.arch target_os = coreclr_args.host_os - checked_root = path.join(source_directory, "artifacts", "bin", "coreclr", target_os + "." + coreclr_args.arch + ".Checked") - release_root = path.join(source_directory, "artifacts", "bin", "coreclr", target_os + "." + coreclr_args.arch + ".Release") + temp_location = coreclr_args.temp_location - # We'll use repo script to install dotnet - dotnet_install_script_name = "dotnet-install.cmd" if is_windows else "dotnet-install.sh" - dotnet_install_script_path = path.join(source_directory, "eng", "common", dotnet_install_script_name) + if not coreclr_args.temp_is_explicit: + os.mkdir(temp_location) + elif not path.isdir(temp_location): + os.mkdir(temp_location) - with tempfile.TemporaryDirectory() as temp_location: + print ("Executing in " + temp_location) + os.chdir(temp_location) - print ("Executing in " + temp_location) - os.chdir(temp_location) + dotnet_exe = "dotnet.exe" if is_windows else "dotnet" + dotnet_directory = os.path.join(temp_location, "tools", "dotnet", target_arch) + if os.path.isdir(dotnet_directory): + dotnet_exe = os.path.join(dotnet_directory, "dotnet") + run_command([dotnet_exe, "--info"], temp_location, _exit_on_fail=True) - # install dotnet 8.0 - run_command([dotnet_install_script_path, "-Version", "8.0.0"], temp_location, _exit_on_fail=True) - os.environ['DOTNET_MULTILEVEL_LOOKUP'] = '0' - os.environ['DOTNET_SKIP_FIRST_TIME_EXPERIENCE'] = '1' - dotnet_path = path.join(source_directory, ".dotnet") - dotnet_exe = path.join(dotnet_path, "dotnet.exe") if is_windows else path.join(dotnet_path, "dotnet") - # run_command([dotnet_exe, "--info"], temp_location, _exit_on_fail=True) - os.environ['DOTNET_ROOT'] = dotnet_path - - ## install crank as local tool + ## install crank as local tool + run_command( + [dotnet_exe, "tool", "install", "Microsoft.Crank.Controller", "--version", "0.2.0-*", "--tool-path", temp_location], _exit_on_fail=True) + + if coreclr_args.local: run_command( - [dotnet_exe, "tool", "install", "Microsoft.Crank.Controller", "--version", "0.2.0-*", "--tool-path", temp_location], _exit_on_fail=True) + [dotnet_exe, "tool", "install", "Microsoft.Crank.Agent", "--version", "0.2.0-*", "--tool-path", temp_location], _exit_on_fail=True) - ## ideally just do sparse clone, but this doesn't work locally - ## git clone --filter=blob:none --no-checkout https://github.com/aspnet/benchmarks - ## cd benchmarks - ## git sparse-checkout init --cone - ## git sparse-checkout set scenarios + ## ideally just do sparse clone, but this doesn't work locally + ## git clone --filter=blob:none --no-checkout https://github.com/aspnet/benchmarks + ## cd benchmarks + ## git sparse-checkout init --cone + ## git sparse-checkout set scenarios - ## could probably just pass a URL and avoid this + ## could probably just pass a URL and avoid this + if not path.isdir(path.join(temp_location, 'benchmarks')): run_command( ["git", "clone", "--quiet", "--depth", "1", "https://github.com/aspnet/benchmarks"], temp_location, _exit_on_fail=True) - crank_app = path.join(temp_location, "crank") - mcs_path = determine_mcs_tool_path(coreclr_args) - superpmi_path = determine_superpmi_tool_path(coreclr_args) - - # todo: add grpc/signalr, perhaps - - configname_scenario_list = [ - ("platform", "plaintext"), - ("json", "json"), - ("plaintext", "mvc"), - ("database", "fortunes_dapper"), - ("database", "fortunes_ef_mvc_https"), - ("database", "updates"), - ("proxy", "proxy-yarp"), - ("staticfiles", "static"), - ("websocket", "websocket"), - ("orchard", "about-sqlite"), - ("signalr", "signalr"), - ("grpc", "grpcaspnetcoreserver-grpcnetclient"), - ("efcore", "NavigationsQuery"), - ("efcore", "Funcletization") - ] - - # configname_scenario_list = [("quic", "read-write")] - - # note tricks to get one element tuples - - runtime_options_list = [ - ("Dummy=0",), - ("TieredCompilation=0", ), - ("TieredPGO=0",), - ("TieredPGO=1", "ReadyToRun=0"), - ("ReadyToRun=0", "OSR_HitLimit=0", "TC_OnStackReplacement_InitialCounter=10"), - ("TC_PartialCompilation=1",) - ] - - # runtime_options_list = [("Dummy=0", )] - - mch_file = path.join(coreclr_args.output_mch_path, "aspnet.run." + target_os + "." + target_arch + ".checked.mch") + crank_app = path.join(temp_location, "crank") + crank_agent_app = path.join(temp_location, "crank-agent") + if os.path.isdir(dotnet_directory): + os.environ['DOTNET_ROOT'] = dotnet_directory + os.environ['DOTNET_MULTILEVEL_LOOKUP'] = '1' + crank_env = os.environ.copy() + mcs_path = determine_mcs_tool_path(coreclr_args) + superpmi_path = determine_superpmi_tool_path(coreclr_args) + + # todo: add grpc/signalr, perhaps + + configname_scenario_list = [ + ("platform", "plaintext"), + # ("json", "json"), + # ("plaintext", "mvc"), + # ("database", "fortunes_dapper"), + # ("database", "fortunes_ef_mvc_https"), + # ("database", "updates"), + # ("proxy", "proxy-yarp"), + # ("staticfiles", "static"), + # ("websocket", "websocket"), + # ("orchard", "about-sqlite"), + # ("signalr", "signalr"), + # ("grpc", "grpcaspnetcoreserver-grpcnetclient"), + # ("efcore", "NavigationsQuery"), + # ("efcore", "Funcletization") + ] + + # configname_scenario_list = [("quic", "read-write")] + + # note tricks to get one element tuples + + runtime_options_list = [ + ("Dummy=0",), + # ("TieredCompilation=0", ), + # ("TieredPGO=0",), + # ("TieredPGO=1", "ReadyToRun=0"), + # ("ReadyToRun=0", "OSR_HitLimit=0", "TC_OnStackReplacement_InitialCounter=10"), + # ("TC_PartialCompilation=1",) + ] + + # runtime_options_list = [("Dummy=0", )] + + mch_file = path.join(coreclr_args.output_mch_path, "aspnet.run." + target_os + "." + target_arch + ".checked.mch") + + if coreclr_args.local: + benchmark_machine = "local" + else: benchmark_machine = determine_benchmark_machine(coreclr_args) - jitname = determine_native_name(coreclr_args, "clrjit", target_os) - coreclrname = determine_native_name(coreclr_args, "coreclr", target_os) - spminame = determine_native_name(coreclr_args, "superpmi-shim-collector", target_os) - corelibname = "System.Private.CoreLib.dll" - - jitpath = path.join(".", jitname) - jitlib = path.join(checked_root, jitname) - coreclr = path.join(release_root, coreclrname) - corelib = path.join(release_root, corelibname) - spmilib = path.join(checked_root, spminame) - + jitname = determine_native_name(coreclr_args, "clrjit", target_os) + coreclrname = determine_native_name(coreclr_args, "coreclr", target_os) + spminame = determine_native_name(coreclr_args, "superpmi-shim-collector", target_os) + corelibname = "System.Private.CoreLib.dll" + + jitpath = path.join(".", jitname) + jitlib = path.join(core_root_directory, jitname) + coreclr = path.join(core_root_directory, coreclrname) + corelib = path.join(core_root_directory, corelibname) + spmilib = path.join(core_root_directory, spminame) + + crank_agent_p = None + if coreclr_args.local: + print(f"Launching crank agent: {crank_agent_app}") + crank_agent_p = subprocess.Popen(crank_agent_app, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE,env=crank_env) + time.sleep(2) + + try: for (configName, scenario) in configname_scenario_list: configYml = configName + ".benchmarks.yml" configFile = path.join(temp_location, "benchmarks", "scenarios", configYml) crank_arguments = ["--config", configFile, - "--profile", benchmark_machine, - "--scenario", scenario, - "--application.framework", "net9.0", - "--application.channel", "edge", - "--application.sdkVersion", "latest", - "--application.environmentVariables", "DOTNET_JitName=" + spminame, - "--application.environmentVariables", "SuperPMIShimLogPath=.", - "--application.environmentVariables", "SuperPMIShimPath=" + jitpath, - "--application.environmentVariables", "DOTNET_EnableExtraSuperPmiQueries=1", - "--application.options.downloadFiles", "*.mc", - "--application.options.displayOutput", "true", -# "--application.options.dumpType", "full", -# "--application.options.fetch", "true", - "--application.options.outputFiles", spmilib, - "--application.options.outputFiles", jitlib, - "--application.options.outputFiles", coreclr, - "--application.options.outputFiles", corelib] + "--profile", benchmark_machine, + "--scenario", scenario, + "--application.framework", "net9.0", + "--application.channel", "edge", + "--application.sdkVersion", "latest", + "--application.environmentVariables", "DOTNET_JitName=" + spminame, + "--application.environmentVariables", "SuperPMIShimLogPath=.", + "--application.environmentVariables", "SuperPMIShimPath=" + jitpath, + "--application.environmentVariables", "DOTNET_EnableExtraSuperPmiQueries=1", + "--application.options.downloadFiles", "*.mc", + "--application.options.displayOutput", "true", + # "--application.options.dumpType", "full", + # "--application.options.fetch", "true", + "--application.options.outputFiles", spmilib, + "--application.options.outputFiles", jitlib, + "--application.options.outputFiles", coreclr, + "--application.options.outputFiles", corelib] for runtime_options in runtime_options_list: runtime_arguments = [] @@ -247,36 +280,53 @@ def build_and_run(coreclr_args): print("") description = ["--description", configName + "-" + scenario + "-" + "-".join(runtime_options)] - subprocess.run([crank_app] + crank_arguments + description + runtime_arguments, cwd=temp_location) - - # merge - command = [mcs_path, "-merge", "temp.mch", "*.mc", "-dedup", "-thin"] + crank_app_args = [crank_app] + crank_arguments + description + runtime_arguments + print(' '.join(crank_app_args)) + run_command(crank_app_args, temp_location, _env=crank_env) + print("Crank finished...") + finally: + if crank_agent_p is not None: + # print('Crank agent stdout:\n') + # for line in iter(crank_agent_p.stdout.readline, ""): + # if not line: + # break + # print(line) + # print('Crank agent stderr:\n') + # for line in iter(crank_agent_p.stderr.readline, ""): + # if not line: + # break + # print(line) + crank_agent_p.terminate() + + # merge + command = [mcs_path, "-merge", "temp.mch", "*.mc", "-dedup", "-thin"] + run_command(command, temp_location) + + # clean + command = [superpmi_path, "-v", "ewmi", "-f", "fail.mcl", jitlib, "temp.mch"] + run_command(command, temp_location) + + # strip + if is_nonzero_length_file("fail.mcl"): + print("Replay had failures, cleaning..."); + fail_file = path.join(coreclr_args.output_mch_path, "fail.mcl"); + command = [mcs_path, "-strip", "fail.mcl", "temp.mch", mch_file] run_command(command, temp_location) + else: + print("Replay was clean..."); + shutil.copy2("temp.mch", mch_file) - # clean - command = [superpmi_path, "-v", "ewmi", "-f", "fail.mcl", jitlib, "temp.mch"] - run_command(command, temp_location) - - # strip - if is_nonzero_length_file("fail.mcl"): - print("Replay had failures, cleaning..."); - fail_file = path.join(coreclr_args.output_mch_path, "fail.mcl"); - command = [mcs_path, "-strip", "fail.mcl", "temp.mch", mch_file] - run_command(command, temp_location) - else: - print("Replay was clean..."); - shutil.copy2("temp.mch", mch_file) - - # index - command = [mcs_path, "-toc", mch_file] - run_command(command, temp_location) + # index + command = [mcs_path, "-toc", mch_file] + run_command(command, temp_location) - # overall summary - print("Merged summary for " + mch_file) - command = [mcs_path, "-jitflags", mch_file] - run_command(command, temp_location) + # overall summary + print("Merged summary for " + mch_file) + command = [mcs_path, "-jitflags", mch_file] + run_command(command, temp_location) - os.chdir(source_directory ) + if not coreclr_args.temp_is_explicit: + shutil.rmtree(temp_location, ignore_errors=True) def main(main_args): """ Main entry point diff --git a/src/coreclr/scripts/superpmi_collect_setup.py b/src/coreclr/scripts/superpmi_collect_setup.py index c1e325e8daeac2..c3f15589916e63 100644 --- a/src/coreclr/scripts/superpmi_collect_setup.py +++ b/src/coreclr/scripts/superpmi_collect_setup.py @@ -410,7 +410,48 @@ def setup_benchmark(workitem_directory, arch): run_command( get_python_name() + [dotnet_install_script, "install", "--channels", "9.0", "--architecture", arch, "--install-dir", dotnet_directory, "--verbose"]) + +def setup_aspnet(workitem_directory, arch): + """ Perform setup of aspnet + Args: + workitem_directory (string): Path to work + arch (string): Architecture for which dotnet will be installed + """ + aspnet_directory = os.path.join(workitem_directory, "aspnet") + + aspnet_benchmarks_directory = os.path.join(aspnet_directory, "benchmarks") + + run_command( + ["git", "clone", "--quiet", "--depth", "1", "https://github.com/aspnet/benchmarks", aspnet_benchmarks_directory]) + + try: + shutil.rmtree(os.path.join(aspnet_benchmarks_directory, ".git")) + except Exception as ex: + print("Warning: failed to remove directory \"%s\": %s", os.path.join(aspnet_benchmarks_directory, ".git"), ex) + + # We use the performance repo to get access to the dotnet install script. + performance_directory = os.path.join(workitem_directory, "performance") + + run_command( + ["git", "clone", "--quiet", "--depth", "1", "https://github.com/dotnet/performance", performance_directory]) + + with ChangeDir(performance_directory): + dotnet_directory = os.path.join(aspnet_directory, "tools", "dotnet", arch) + dotnet_install_script = os.path.join(performance_directory, "scripts", "dotnet.py") + + if not os.path.isfile(dotnet_install_script): + print("Missing " + dotnet_install_script) + return + + # Sometimes the dotnet version installed by the script is latest and expect certain versions of SDK that + # have not published yet. As a result, we hit errors of "dotnet restore". As a workaround, hard code the + # working version until we move to ".NET 8" in the script. + run_command( + get_python_name() + [dotnet_install_script, "install", "--channels", "8.0", "--architecture", arch, "--install-dir", + dotnet_directory, "--verbose"]) + + shutil.rmtree(performance_directory, ignore_errors=True) def get_python_name(): """Gets the python name @@ -506,6 +547,8 @@ def main(main_args): if coreclr_args.collection_name == "benchmarks" or coreclr_args.collection_name == "realworld": # Setup benchmarks setup_benchmark(workitem_payload_directory, arch) + elif coreclr_args.collection_name == "aspnet": + setup_aspnet(workitem_payload_directory, arch) else: # Setup for pmi/crossgen2/nativeaot runs