Skip to content
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
20 changes: 18 additions & 2 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@
more than `limit` failures.
"""

compile_help = """\
Compile only specified method contexts, e.g., `-compile 20,25`. This is passed directly to the superpmi.exe `-compile` argument. See `superpmi.exe -?` for full documentation about allowed formats.
"""

# Start of parser object creation.

parser = argparse.ArgumentParser(description=description)
Expand Down Expand Up @@ -297,6 +301,7 @@
replay_common_parser.add_argument("--force_download", action="store_true", help=force_download_help)
replay_common_parser.add_argument("-jit_ee_version", help=jit_ee_version_help)
replay_common_parser.add_argument("-private_store", action="append", help=private_store_help)
replay_common_parser.add_argument("-compile", "-c", help=compile_help)

# subparser for replay
replay_parser = subparsers.add_parser("replay", description=replay_description, parents=[core_root_parser, target_parser, superpmi_common_parser, replay_common_parser])
Expand Down Expand Up @@ -1212,7 +1217,7 @@ def replay(self):
if self.coreclr_args.arch != self.coreclr_args.target_arch:
repro_flags += [ "-target", self.coreclr_args.target_arch ]

if not self.coreclr_args.sequential:
if not self.coreclr_args.sequential and not self.coreclr_args.compile:
common_flags += [ "-p" ]

if self.coreclr_args.break_on_assert:
Expand All @@ -1221,6 +1226,9 @@ def replay(self):
if self.coreclr_args.break_on_error:
common_flags += [ "-boe" ]

if self.coreclr_args.compile:
common_flags += [ "-c", self.coreclr_args.compile ]

if self.coreclr_args.spmi_log_file is not None:
common_flags += [ "-w", self.coreclr_args.spmi_log_file ]

Expand Down Expand Up @@ -1452,7 +1460,7 @@ def replay_with_asm_diffs(self):
flags += base_option_flags
flags += diff_option_flags

if not self.coreclr_args.sequential:
if not self.coreclr_args.sequential and not self.coreclr_args.compile:
flags += [ "-p" ]

if self.coreclr_args.break_on_assert:
Expand All @@ -1461,6 +1469,9 @@ def replay_with_asm_diffs(self):
if self.coreclr_args.break_on_error:
flags += [ "-boe" ]

if self.coreclr_args.compile:
flags += [ "-c", self.coreclr_args.compile ]

if self.coreclr_args.spmi_log_file is not None:
flags += [ "-w", self.coreclr_args.spmi_log_file ]

Expand Down Expand Up @@ -2970,6 +2981,11 @@ def verify_replay_common_args():
lambda unused: True,
"Unable to set mch_files")

coreclr_args.verify(args,
"compile",
lambda unused: True,
"Method context not valid")

coreclr_args.verify(args,
"private_store",
lambda item: True,
Expand Down