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
30 changes: 13 additions & 17 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def add_core_root_arguments(parser, build_type_default, build_type_help):
replay_common_parser.add_argument("-private_store", action="append", help=private_store_help)
replay_common_parser.add_argument("-compile", "-c", help=compile_help)
replay_common_parser.add_argument("--produce_repro", action="store_true", help=produce_repro_help)
replay_common_parser.add_argument("-details", help="Specify full path to details file")
replay_common_parser.add_argument("-details", help="Specify full path to details file or folder")

# 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 @@ -1663,6 +1663,14 @@ def report_replay_asserts(asserts, output_mch_file):
logging.info(" ... omitting %s instances", assertion_instance_count - instance_num)
break

def get_details_file_path(coreclr_args, mch_file, temp_location):
if coreclr_args.details:
if os.path.isdir(coreclr_args.details):
return os.path.join(coreclr_args.details, os.path.basename(mch_file) + ".csv")
else:
return coreclr_args.details
else:
return os.path.join(temp_location, os.path.basename(mch_file) + "_details.csv")
Comment thread
jakobbotsch marked this conversation as resolved.

################################################################################
# SuperPMI Replay
Expand Down Expand Up @@ -1787,10 +1795,7 @@ def replay(self):

fail_mcl_file = os.path.join(temp_location, os.path.basename(mch_file) + "_fail.mcl")

if self.coreclr_args.details:
details_info_file = self.coreclr_args.details
else:
details_info_file = os.path.join(temp_location, os.path.basename(mch_file) + "_details.csv")
details_info_file = get_details_file_path(self.coreclr_args, mch_file, temp_location)

flags += [
"-f", fail_mcl_file, # Failing mc List
Expand Down Expand Up @@ -2256,10 +2261,7 @@ def replay_with_asm_diffs(self):

fail_mcl_file = os.path.join(temp_location, os.path.basename(mch_file) + "_fail.mcl")

if self.coreclr_args.details:
details_info_file = self.coreclr_args.details
else:
details_info_file = os.path.join(temp_location, os.path.basename(mch_file) + "_details.csv")
details_info_file = get_details_file_path(self.coreclr_args, mch_file, temp_location)

flags = [
"-a", # Asm diffs
Expand Down Expand Up @@ -3169,10 +3171,7 @@ def replay_with_throughput_diff(self):

logging.info("Running throughput diff of %s", mch_file)

if self.coreclr_args.details:
details_info_file = self.coreclr_args.details
else:
details_info_file = os.path.join(temp_location, os.path.basename(mch_file) + "_details.csv")
details_info_file = get_details_file_path(self.coreclr_args, mch_file, temp_location)

pin_options = [
"-follow_execv", # attach to child processes
Expand Down Expand Up @@ -3507,10 +3506,7 @@ def replay_with_metric_diff(self):

logging.info("Running metric diff of %s", mch_file)

if self.coreclr_args.details:
details_info_file = self.coreclr_args.details
else:
details_info_file = os.path.join(temp_location, os.path.basename(mch_file) + "_details.csv")
details_info_file = get_details_file_path(self.coreclr_args, mch_file, temp_location)

flags = [
"-applyDiff",
Expand Down
Loading