Skip to content
Merged
Changes from 1 commit
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
27 changes: 25 additions & 2 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@
more than `limit` failures.
"""

compile_help = """
Compile only those method contexts whose indices are specified.
Indices can be either a single index, comma separated values,
a range, or the name of a .MCL file with newline delimited indices.
e.g. -compile 20
e.g. -compile 20,25,30,32
e.g. -compile 10-99
e.g. -compile 5,10-99,101,201-300
e.g. -compile failed.mcl
"""

# Start of parser object creation.

parser = argparse.ArgumentParser(description=description)
Expand Down Expand Up @@ -297,6 +308,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", 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 +1224,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 +1233,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 +1467,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 +1476,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 +2988,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