Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

superpmi.py: Add -jitoption for asmdiffs #70939

Merged
merged 1 commit into from
Jun 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,13 @@ def add_core_root_arguments(parser, build_type_default, build_type_help):
replay_parser.add_argument("-jit_path", help="Path to clrjit. Defaults to Core_Root JIT.")
replay_parser.add_argument("-jitoption", action="append", help="Pass option through to the jit. Format is key=value, where key is the option name without leading COMPlus_")

# common subparser for asmdiffs and throughput
base_diff_parser = argparse.ArgumentParser(add_help=False)
base_diff_parser.add_argument("-base_jit_path", help="Path to baseline clrjit. Defaults to baseline JIT from rolling build, by computing baseline git hash.")
base_diff_parser.add_argument("-diff_jit_path", help="Path to diff clrjit. Defaults to Core_Root JIT.")
base_diff_parser.add_argument("-git_hash", help="Use this git hash as the current hash for use to find a baseline JIT. Defaults to current git hash of source tree.")
base_diff_parser.add_argument("-base_git_hash", help="Use this git hash as the baseline JIT hash. Default: search for the baseline hash.")
base_diff_parser.add_argument("-jitoption", action="append", help="Option to pass to both baseline and diff JIT. Format is key=value, where key is the option name without leading COMPlus_")
base_diff_parser.add_argument("-base_jit_option", action="append", help="Option to pass to the baseline JIT. Format is key=value, where key is the option name without leading COMPlus_...")
base_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_...")

Expand Down Expand Up @@ -1465,6 +1467,9 @@ def replay_with_asm_diffs(self):
if self.coreclr_args.base_jit_option:
for o in self.coreclr_args.base_jit_option:
base_option_flags += "-jitoption", o
if self.coreclr_args.jitoption:
for o in self.coreclr_args.jitoption:
base_option_flags += "-jitoption", o
base_option_flags_for_diff_artifact = base_option_flags

diff_option_flags = []
Expand All @@ -1473,6 +1478,10 @@ def replay_with_asm_diffs(self):
for o in self.coreclr_args.diff_jit_option:
diff_option_flags += "-jit2option", o
diff_option_flags_for_diff_artifact += "-jitoption", o
if self.coreclr_args.jitoption:
for o in self.coreclr_args.jitoption:
diff_option_flags += "-jit2option", o
diff_option_flags_for_diff_artifact += "-jitoption", o

if self.coreclr_args.altjit:
altjit_asm_diffs_flags += [
Expand Down Expand Up @@ -3376,6 +3385,11 @@ def verify_base_diff_args():
lambda unused: True,
"Unable to set base_git_hash")

coreclr_args.verify(args,
"jitoption",
lambda unused: True,
"Unable to set jitoption")

coreclr_args.verify(args,
"base_jit_option",
lambda unused: True,
Expand Down