From b1de5c4f9c15a6a61eba070908d2b6eb796fd8b1 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 16 Nov 2021 15:02:08 -0800 Subject: [PATCH 01/13] Temp change to disable align loop --- src/coreclr/jit/jitconfigvalues.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index 658ba2a69186a..5f4cbd3484394 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -250,7 +250,7 @@ CONFIG_INTEGER(EnableIncompleteISAClass, W("EnableIncompleteISAClass"), 0) // En #endif // defined(DEBUG) #if FEATURE_LOOP_ALIGN -CONFIG_INTEGER(JitAlignLoops, W("JitAlignLoops"), 1) // If set, align inner loops +CONFIG_INTEGER(JitAlignLoops, W("JitAlignLoops"), 0) // If set, align inner loops #else CONFIG_INTEGER(JitAlignLoops, W("JitAlignLoops"), 0) #endif From db3de57ef952137eb3eec24cf4ff73d6a1968762 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 16 Nov 2021 15:01:57 -0800 Subject: [PATCH 02/13] download specific artifacts to squash: --- .../download-specific-artifact-step.yml | 6 +++--- eng/pipelines/coreclr/superpmi-asmdiffs.yml | 20 +++++++++---------- .../templates/superpmi-asmdiffs-job.yml | 6 +++--- src/coreclr/scripts/superpmi-asmdiffs.proj | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/eng/pipelines/common/download-specific-artifact-step.yml b/eng/pipelines/common/download-specific-artifact-step.yml index 180eb889d5a54..a80fc22e8e8c6 100644 --- a/eng/pipelines/common/download-specific-artifact-step.yml +++ b/eng/pipelines/common/download-specific-artifact-step.yml @@ -12,10 +12,10 @@ steps: inputs: buildType: specific project: 'public' # 'internal' or 'public' - pipeline: 'Antigen' + pipeline: 'runtime-coreclr superpmi-asmdiffs' buildVersionToDownload: specific - branchName: 'refs/pull/59376/head' - buildId: '1387378' + branchName: 'refs/pull/61700/head' + buildId: '1472902' downloadType: single downloadPath: '$(Build.SourcesDirectory)/__download__' artifactName: '${{ parameters.artifactName }}' diff --git a/eng/pipelines/coreclr/superpmi-asmdiffs.yml b/eng/pipelines/coreclr/superpmi-asmdiffs.yml index d8835b40b8133..e0a03f6fdd916 100644 --- a/eng/pipelines/coreclr/superpmi-asmdiffs.yml +++ b/eng/pipelines/coreclr/superpmi-asmdiffs.yml @@ -16,15 +16,15 @@ pr: jobs: -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/coreclr/templates/build-jit-job.yml - buildConfig: checked - platforms: - - windows_x64 - - windows_x86 - jobParameters: - uploadAs: 'pipelineArtifacts' +# - template: /eng/pipelines/common/platform-matrix.yml +# parameters: +# jobTemplate: /eng/pipelines/coreclr/templates/build-jit-job.yml +# buildConfig: checked +# platforms: +# - windows_x64 +# - windows_x86 +# jobParameters: +# uploadAs: 'pipelineArtifacts' - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -32,6 +32,6 @@ jobs: buildConfig: checked platforms: - windows_x64 - - windows_x86 + # - windows_x86 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml \ No newline at end of file diff --git a/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml b/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml index bb05902efe969..fe41cf8681638 100644 --- a/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml +++ b/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml @@ -23,15 +23,15 @@ jobs: dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }} helixQueues: ${{ parameters.helixQueues }} - dependsOn: - - ${{ format('coreclr_jit_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} + # dependsOn: + # - ${{ format('coreclr_jit_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} variables: ${{ parameters.variables }} steps: # Download jit builds - - template: /eng/pipelines/common/download-artifact-step.yml + - template: /eng/pipelines/common/download-specific-artifact-step.yml parameters: unpackFolder: $(buildProductRootFolderPath) artifactFileName: '$(buildProductArtifactName)$(archiveExtension)' diff --git a/src/coreclr/scripts/superpmi-asmdiffs.proj b/src/coreclr/scripts/superpmi-asmdiffs.proj index 170b306202224..7ec6d8aa86394 100644 --- a/src/coreclr/scripts/superpmi-asmdiffs.proj +++ b/src/coreclr/scripts/superpmi-asmdiffs.proj @@ -53,15 +53,15 @@ - + - + From d69c0a1328f8035c3a15da3171118881a5697c98 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 16 Nov 2021 15:02:22 -0800 Subject: [PATCH 03/13] Upload .dasm files --- .../templates/run-superpmi-asmdiffs-job.yml | 8 +++ src/coreclr/scripts/superpmi-asmdiffs.proj | 2 +- src/coreclr/scripts/superpmi_asmdiffs.py | 56 +++++++++++++++++-- 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-job.yml b/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-job.yml index 46535d20e8680..6bf5a3e8d0191 100644 --- a/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-job.yml +++ b/eng/pipelines/coreclr/templates/run-superpmi-asmdiffs-job.yml @@ -111,6 +111,14 @@ jobs: targetFolder: '$(SpmiAsmdiffsLocation)' condition: always() + - task: CopyFiles@2 + displayName: Copying dasm files of all partitions + inputs: + sourceFolder: '$(HelixResultLocation)' + contents: '**/Asmdiffs_*.zip' + targetFolder: '$(SpmiAsmdiffsLocation)' + condition: always() + - script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi_asmdiffs_summarize.py -diff_summary_dir $(SpmiAsmdiffsLocation) -arch $(archType) displayName: ${{ format('Summarize ({0})', parameters.archType) }} condition: always() diff --git a/src/coreclr/scripts/superpmi-asmdiffs.proj b/src/coreclr/scripts/superpmi-asmdiffs.proj index 7ec6d8aa86394..4a102b480957a 100644 --- a/src/coreclr/scripts/superpmi-asmdiffs.proj +++ b/src/coreclr/scripts/superpmi-asmdiffs.proj @@ -67,7 +67,7 @@ $(WorkItemCommand) -arch %(HelixWorkItem.Architecture) -platform %(HelixWorkItem.Platform) $(WorkItemTimeout) - superpmi_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).log;superpmi_download_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).log;superpmi_diff_summary_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).md + superpmi_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).log;superpmi_download_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).log;superpmi_diff_summary_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).md;Asmdiffs_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).zip diff --git a/src/coreclr/scripts/superpmi_asmdiffs.py b/src/coreclr/scripts/superpmi_asmdiffs.py index aca3fe959f363..edd8e27c42e44 100644 --- a/src/coreclr/scripts/superpmi_asmdiffs.py +++ b/src/coreclr/scripts/superpmi_asmdiffs.py @@ -13,10 +13,10 @@ ################################################################################ import argparse -import os +from os import walk, path import shutil from coreclr_arguments import * -from jitutil import run_command +from jitutil import run_command, TempDir parser = argparse.ArgumentParser(description="description") @@ -66,6 +66,53 @@ def setup_args(args): return coreclr_args +def copy_dasm_files(spmi_location, upload_directory, tag_name): + """Copyes .dasm files in a tempDirectory, zip it and copy the compressed file in upload directory. + + Args: + spmi_location (string): Location where .dasm files are present + upload_directory (string): Upload directory + """ + + print("Copy .dasm files") + + # Create upload_directory + if not os.path.isdir(upload_directory): + os.makedirs(upload_directory) + + # Create temp directory to copy all issues to upload. We don't want to create a sub-folder + # inside issues_directory because that will also get included twice. + with TempDir() as prep_directory: + for file_path, dirs, files in walk(spmi_location, topdown=True): + # Credit: https://stackoverflow.com/a/19859907 + dirs[:] = [d for d in dirs] + for name in files: + if not name.lower().endswith(".dasm"): + continue + + dasm_src_file = path.join(file_path, name) + dasm_dst_file = dasm_src_file.replace(spmi_location, prep_directory) + dst_directory = path.dirname(dasm_dst_file) + if not os.path.exists(dst_directory): + os.makedirs(dst_directory) + try: + shutil.copy2(dasm_src_file, dasm_dst_file) + except PermissionError as pe_error: + print('Ignoring PermissionError: {0}'.format(pe_error)) + + # Zip compress the files we will upload + zip_path = os.path.join(prep_directory, "Asmdiffs_" + tag_name) + print("Creating archive: " + zip_path) + shutil.make_archive(zip_path, 'zip', prep_directory) + + zip_path += ".zip" + dst_zip_path = os.path.join(upload_directory, "Asmdiffs_" + tag_name + ".zip") + print("Copying {} to {}".format(zip_path, dst_zip_path)) + try: + shutil.copy2(zip_path, dst_zip_path) + except PermissionError as pe_error: + print('Ignoring PermissionError: {0}'.format(pe_error)) + def main(main_args): """ Run superpmi asmdiffs process on the Helix machines. @@ -169,6 +216,8 @@ def main(main_args): shutil.copy2(overall_md_summary_file, overall_md_summary_file_target) except PermissionError as pe_error: print('Ignoring PermissionError: {0}'.format(pe_error)) + + copy_dasm_files(spmi_location, log_directory, "{}_{}".format(platform_name, arch_name)) else: # Write a basic summary file. Ideally, we should not generate a summary.md file. However, currently I'm seeing # errors where the Helix work item fails to upload this specified file if it doesn't exist. We should change the @@ -178,9 +227,6 @@ def main(main_args): No diffs found """) - # TODO: the superpmi.py asmdiffs command returns a failure code if there are MISSING data even if there are - # no asm diffs. We should probably only fail if there are actual failures (not MISSING or asm diffs). - if return_code != 0: print("Failure in {}".format(log_file)) return 1 From f7a4a8474a3cfb69c2ba71d6bfc14c3f2ddfac7a Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 16 Nov 2021 15:53:33 -0800 Subject: [PATCH 04/13] fix the build id --- eng/pipelines/common/download-specific-artifact-step.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/common/download-specific-artifact-step.yml b/eng/pipelines/common/download-specific-artifact-step.yml index a80fc22e8e8c6..7ec3839780b5f 100644 --- a/eng/pipelines/common/download-specific-artifact-step.yml +++ b/eng/pipelines/common/download-specific-artifact-step.yml @@ -15,7 +15,7 @@ steps: pipeline: 'runtime-coreclr superpmi-asmdiffs' buildVersionToDownload: specific branchName: 'refs/pull/61700/head' - buildId: '1472902' + buildId: '1472834' downloadType: single downloadPath: '$(Build.SourcesDirectory)/__download__' artifactName: '${{ parameters.artifactName }}' From 7fd043eb69d4371c9798f8cb3b2ab06193202769 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 16 Nov 2021 18:52:01 -0800 Subject: [PATCH 05/13] Add ci_run and retainOnlyTopFiles --- src/coreclr/scripts/superpmi.py | 8 ++++++++ src/coreclr/scripts/superpmi_asmdiffs.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index f59a00fb42582..7292bbca7de20 100755 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -318,6 +318,7 @@ asm_diff_parser.add_argument("-diff_jit_option", action="append", help="Option to pass to the diff JIT. Format is key=value, where key is the option name without leading COMPlus_...") asm_diff_parser.add_argument("-tag", help="Specify a word to add to the directory name where the asm diffs will be placed") asm_diff_parser.add_argument("-metrics", action="append", help="Metrics option to pass to jit-analyze. Can be specified multiple times, or pass comma-separated values.") +asm_diff_parser.add_argument("-ci_run", action="store_true", help="Is this a CI-run? If yes, it will pass a flag to jit-analyze to delete unnecessary .dasm files.") # subparser for upload upload_parser = subparsers.add_parser("upload", description=upload_description, parents=[core_root_parser, target_parser]) @@ -1628,6 +1629,8 @@ async def create_one_artifact(jit_path: str, location: str, flags) -> str: summary_file_info = ( mch_file, md_summary_file ) all_md_summary_files.append(summary_file_info) command = [ jit_analyze_path, "--md", md_summary_file, "-r", "--base", base_asm_location, "--diff", diff_asm_location ] + if self.coreclr_args.ci_run: + command += [ "-retainOnlyTopFiles" ] if self.coreclr_args.metrics: command += [ "--metrics", ",".join(self.coreclr_args.metrics) ] elif base_bytes is not None and diff_bytes is not None: @@ -3261,6 +3264,11 @@ def verify_replay_common_args(): lambda unused: True, "Unable to set metrics.") + coreclr_args.verify(args, + "ci_run", + lambda unused: True, + "Unable to set ci_run.") + process_base_jit_path_arg(coreclr_args) jit_in_product_location = False diff --git a/src/coreclr/scripts/superpmi_asmdiffs.py b/src/coreclr/scripts/superpmi_asmdiffs.py index edd8e27c42e44..44e1055748c0b 100644 --- a/src/coreclr/scripts/superpmi_asmdiffs.py +++ b/src/coreclr/scripts/superpmi_asmdiffs.py @@ -203,7 +203,8 @@ def main(main_args): "-spmi_location", spmi_location, "-error_limit", "100", "-log_level", "debug", - "-log_file", log_file]) + "-log_file", log_file, + "-ci_run"]) # If there are asm diffs, and jit-analyze ran, we'll get a diff_summary.md file in the spmi_location directory. # We make sure the file doesn't exist before we run diffs, so we don't need to worry about superpmi.py creating From d664d3f4edff49054a95a0ff8593a82b4516aa7a Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 06:55:36 -0800 Subject: [PATCH 06/13] Rename ci_run to retainOnlyTop --- src/coreclr/scripts/superpmi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 7292bbca7de20..c89d8d4c33ce8 100755 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -318,7 +318,7 @@ asm_diff_parser.add_argument("-diff_jit_option", action="append", help="Option to pass to the diff JIT. Format is key=value, where key is the option name without leading COMPlus_...") asm_diff_parser.add_argument("-tag", help="Specify a word to add to the directory name where the asm diffs will be placed") asm_diff_parser.add_argument("-metrics", action="append", help="Metrics option to pass to jit-analyze. Can be specified multiple times, or pass comma-separated values.") -asm_diff_parser.add_argument("-ci_run", action="store_true", help="Is this a CI-run? If yes, it will pass a flag to jit-analyze to delete unnecessary .dasm files.") +asm_diff_parser.add_argument("-retainOnlyTopFiles", action="store_true", help="Is passed, it will retain only top .dasm files that has largest diffs and delete remaining files.") # subparser for upload upload_parser = subparsers.add_parser("upload", description=upload_description, parents=[core_root_parser, target_parser]) @@ -1629,7 +1629,7 @@ async def create_one_artifact(jit_path: str, location: str, flags) -> str: summary_file_info = ( mch_file, md_summary_file ) all_md_summary_files.append(summary_file_info) command = [ jit_analyze_path, "--md", md_summary_file, "-r", "--base", base_asm_location, "--diff", diff_asm_location ] - if self.coreclr_args.ci_run: + if self.coreclr_args.retainOnlyTopFiles: command += [ "-retainOnlyTopFiles" ] if self.coreclr_args.metrics: command += [ "--metrics", ",".join(self.coreclr_args.metrics) ] @@ -3265,9 +3265,9 @@ def verify_replay_common_args(): "Unable to set metrics.") coreclr_args.verify(args, - "ci_run", + "retainOnlyTopFiles", lambda unused: True, - "Unable to set ci_run.") + "Unable to set retainOnlyTopFiles.") process_base_jit_path_arg(coreclr_args) From 3ef7adb931c703e46628881335150ad3a6fa8bd8 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 10:24:43 -0800 Subject: [PATCH 07/13] Disable struct promo to test asmdiff --- src/coreclr/jit/jitconfigvalues.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index 5f4cbd3484394..e4db7e8e6935c 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -563,7 +563,7 @@ CONFIG_INTEGER(JitSaveFpLrWithCalleeSavedRegisters, W("JitSaveFpLrWithCalleeSave #endif // defined(TARGET_ARM64) #endif // DEBUG -CONFIG_INTEGER(JitEnregStructLocals, W("JitEnregStructLocals"), 1) // Allow to enregister locals with struct type. +CONFIG_INTEGER(JitEnregStructLocals, W("JitEnregStructLocals"), 0) // Allow to enregister locals with struct type. #undef CONFIG_INTEGER #undef CONFIG_STRING From 833648d4306814db11a69e0be855d489c6918b46 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 10:26:34 -0800 Subject: [PATCH 08/13] Revert "Disable struct promo to test asmdiff" This reverts commit 3ef7adb931c703e46628881335150ad3a6fa8bd8. --- src/coreclr/jit/jitconfigvalues.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index e4db7e8e6935c..5f4cbd3484394 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -563,7 +563,7 @@ CONFIG_INTEGER(JitSaveFpLrWithCalleeSavedRegisters, W("JitSaveFpLrWithCalleeSave #endif // defined(TARGET_ARM64) #endif // DEBUG -CONFIG_INTEGER(JitEnregStructLocals, W("JitEnregStructLocals"), 0) // Allow to enregister locals with struct type. +CONFIG_INTEGER(JitEnregStructLocals, W("JitEnregStructLocals"), 1) // Allow to enregister locals with struct type. #undef CONFIG_INTEGER #undef CONFIG_STRING From c257017ccd613b729639d55525370ad073132a46 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 10:27:07 -0800 Subject: [PATCH 09/13] fix the parameter retainOnlyTopFiles --- src/coreclr/scripts/superpmi_asmdiffs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/scripts/superpmi_asmdiffs.py b/src/coreclr/scripts/superpmi_asmdiffs.py index 44e1055748c0b..d59b01159f4c4 100644 --- a/src/coreclr/scripts/superpmi_asmdiffs.py +++ b/src/coreclr/scripts/superpmi_asmdiffs.py @@ -204,7 +204,7 @@ def main(main_args): "-error_limit", "100", "-log_level", "debug", "-log_file", log_file, - "-ci_run"]) + "-retainOnlyTopFiles"]) # If there are asm diffs, and jit-analyze ran, we'll get a diff_summary.md file in the spmi_location directory. # We make sure the file doesn't exist before we run diffs, so we don't need to worry about superpmi.py creating From 08abccffbb29e5f41d86b96e95196f6004d5d388 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 11:51:47 -0800 Subject: [PATCH 10/13] add missing - --- src/coreclr/scripts/superpmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index c89d8d4c33ce8..9e0f7130d15fb 100755 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -1630,7 +1630,7 @@ async def create_one_artifact(jit_path: str, location: str, flags) -> str: all_md_summary_files.append(summary_file_info) command = [ jit_analyze_path, "--md", md_summary_file, "-r", "--base", base_asm_location, "--diff", diff_asm_location ] if self.coreclr_args.retainOnlyTopFiles: - command += [ "-retainOnlyTopFiles" ] + command += [ "--retainOnlyTopFiles" ] if self.coreclr_args.metrics: command += [ "--metrics", ",".join(self.coreclr_args.metrics) ] elif base_bytes is not None and diff_bytes is not None: From 79233574ceb7c8e1f27b7e7342a6a926aa9e8b23 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 13:38:05 -0800 Subject: [PATCH 11/13] Revert "Temp change to disable align loop" This reverts commit b1de5c4f9c15a6a61eba070908d2b6eb796fd8b1. --- src/coreclr/jit/jitconfigvalues.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/jitconfigvalues.h b/src/coreclr/jit/jitconfigvalues.h index 5f4cbd3484394..658ba2a69186a 100644 --- a/src/coreclr/jit/jitconfigvalues.h +++ b/src/coreclr/jit/jitconfigvalues.h @@ -250,7 +250,7 @@ CONFIG_INTEGER(EnableIncompleteISAClass, W("EnableIncompleteISAClass"), 0) // En #endif // defined(DEBUG) #if FEATURE_LOOP_ALIGN -CONFIG_INTEGER(JitAlignLoops, W("JitAlignLoops"), 0) // If set, align inner loops +CONFIG_INTEGER(JitAlignLoops, W("JitAlignLoops"), 1) // If set, align inner loops #else CONFIG_INTEGER(JitAlignLoops, W("JitAlignLoops"), 0) #endif From 6f9dbd8eb658c77308545cf610075ecb65635983 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 13:39:35 -0800 Subject: [PATCH 12/13] Revert "download specific artifacts" This reverts commit db3de57ef952137eb3eec24cf4ff73d6a1968762. --- .../download-specific-artifact-step.yml | 6 +++--- eng/pipelines/coreclr/superpmi-asmdiffs.yml | 20 +++++++++---------- .../templates/superpmi-asmdiffs-job.yml | 6 +++--- src/coreclr/scripts/superpmi-asmdiffs.proj | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/eng/pipelines/common/download-specific-artifact-step.yml b/eng/pipelines/common/download-specific-artifact-step.yml index 7ec3839780b5f..180eb889d5a54 100644 --- a/eng/pipelines/common/download-specific-artifact-step.yml +++ b/eng/pipelines/common/download-specific-artifact-step.yml @@ -12,10 +12,10 @@ steps: inputs: buildType: specific project: 'public' # 'internal' or 'public' - pipeline: 'runtime-coreclr superpmi-asmdiffs' + pipeline: 'Antigen' buildVersionToDownload: specific - branchName: 'refs/pull/61700/head' - buildId: '1472834' + branchName: 'refs/pull/59376/head' + buildId: '1387378' downloadType: single downloadPath: '$(Build.SourcesDirectory)/__download__' artifactName: '${{ parameters.artifactName }}' diff --git a/eng/pipelines/coreclr/superpmi-asmdiffs.yml b/eng/pipelines/coreclr/superpmi-asmdiffs.yml index e0a03f6fdd916..d8835b40b8133 100644 --- a/eng/pipelines/coreclr/superpmi-asmdiffs.yml +++ b/eng/pipelines/coreclr/superpmi-asmdiffs.yml @@ -16,15 +16,15 @@ pr: jobs: -# - template: /eng/pipelines/common/platform-matrix.yml -# parameters: -# jobTemplate: /eng/pipelines/coreclr/templates/build-jit-job.yml -# buildConfig: checked -# platforms: -# - windows_x64 -# - windows_x86 -# jobParameters: -# uploadAs: 'pipelineArtifacts' +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/build-jit-job.yml + buildConfig: checked + platforms: + - windows_x64 + - windows_x86 + jobParameters: + uploadAs: 'pipelineArtifacts' - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -32,6 +32,6 @@ jobs: buildConfig: checked platforms: - windows_x64 - # - windows_x86 + - windows_x86 helixQueueGroup: ci helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml \ No newline at end of file diff --git a/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml b/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml index fe41cf8681638..bb05902efe969 100644 --- a/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml +++ b/eng/pipelines/coreclr/templates/superpmi-asmdiffs-job.yml @@ -23,15 +23,15 @@ jobs: dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }} helixQueues: ${{ parameters.helixQueues }} - # dependsOn: - # - ${{ format('coreclr_jit_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} + dependsOn: + - ${{ format('coreclr_jit_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} variables: ${{ parameters.variables }} steps: # Download jit builds - - template: /eng/pipelines/common/download-specific-artifact-step.yml + - template: /eng/pipelines/common/download-artifact-step.yml parameters: unpackFolder: $(buildProductRootFolderPath) artifactFileName: '$(buildProductArtifactName)$(archiveExtension)' diff --git a/src/coreclr/scripts/superpmi-asmdiffs.proj b/src/coreclr/scripts/superpmi-asmdiffs.proj index 4a102b480957a..aef782d769cb9 100644 --- a/src/coreclr/scripts/superpmi-asmdiffs.proj +++ b/src/coreclr/scripts/superpmi-asmdiffs.proj @@ -53,15 +53,15 @@ - + - + From dd0dafa764722492d330faa7fd30b24866898b20 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 17 Nov 2021 17:21:41 -0800 Subject: [PATCH 13/13] Review comments --- src/coreclr/scripts/superpmi.py | 2 +- src/coreclr/scripts/superpmi_asmdiffs.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 9e0f7130d15fb..86ab04a9b4d92 100755 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -318,7 +318,7 @@ asm_diff_parser.add_argument("-diff_jit_option", action="append", help="Option to pass to the diff JIT. Format is key=value, where key is the option name without leading COMPlus_...") asm_diff_parser.add_argument("-tag", help="Specify a word to add to the directory name where the asm diffs will be placed") asm_diff_parser.add_argument("-metrics", action="append", help="Metrics option to pass to jit-analyze. Can be specified multiple times, or pass comma-separated values.") -asm_diff_parser.add_argument("-retainOnlyTopFiles", action="store_true", help="Is passed, it will retain only top .dasm files that has largest diffs and delete remaining files.") +asm_diff_parser.add_argument("-retainOnlyTopFiles", action="store_true", help="Retain only top .dasm files with largest improvements or regressions and delete remaining files.") # subparser for upload upload_parser = subparsers.add_parser("upload", description=upload_description, parents=[core_root_parser, target_parser]) diff --git a/src/coreclr/scripts/superpmi_asmdiffs.py b/src/coreclr/scripts/superpmi_asmdiffs.py index d59b01159f4c4..ffd1fd9424b2d 100644 --- a/src/coreclr/scripts/superpmi_asmdiffs.py +++ b/src/coreclr/scripts/superpmi_asmdiffs.py @@ -67,11 +67,12 @@ def setup_args(args): return coreclr_args def copy_dasm_files(spmi_location, upload_directory, tag_name): - """Copyes .dasm files in a tempDirectory, zip it and copy the compressed file in upload directory. + """Copies .dasm files to a tempDirectory, zip it, and copy the compressed file to the upload directory. Args: spmi_location (string): Location where .dasm files are present upload_directory (string): Upload directory + tag_name (string): tag_name used in zip file name. """ print("Copy .dasm files")