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
38 changes: 18 additions & 20 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,13 +2211,17 @@ def replay_with_asm_diffs(self):
logging.info("Running asm diffs of %s", mch_file)

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

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")

flags = [
"-a", # Asm diffs
"-v", "ewi", # display errors, warnings, missing, jit info
"-f", fail_mcl_file, # Failing mc List
"-details", detailed_info_file, # Detailed information about each context
"-details", details_info_file, # Detailed information about each context
]
if self.coreclr_args.produce_repro:
flags += [
Expand Down Expand Up @@ -2265,7 +2269,7 @@ def replay_with_asm_diffs(self):

print_superpmi_error_result(return_code, self.coreclr_args)

(base_metrics, diff_metrics, diffs) = aggregate_diff_metrics(detailed_info_file)
(base_metrics, diff_metrics, diffs) = aggregate_diff_metrics(details_info_file)
print_superpmi_success_result(return_code, base_metrics, diff_metrics)

artifacts_base_name = create_artifacts_base_name(self.coreclr_args, mch_file)
Expand Down Expand Up @@ -2555,10 +2559,6 @@ def create_exception():
os.remove(fail_mcl_file)
fail_mcl_file = None

if os.path.isfile(detailed_info_file):
os.remove(detailed_info_file)
detailed_info_file = None

################################################################################################ end of for mch_file in self.mch_files

# Report the overall results summary of the asmdiffs run
Expand Down Expand Up @@ -3091,7 +3091,10 @@ def replay_with_throughput_diff(self):

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

detailed_info_file = os.path.join(temp_location, os.path.basename(mch_file) + "_details.csv")
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")

pin_options = [
"-follow_execv", # attach to child processes
Expand All @@ -3100,7 +3103,7 @@ def replay_with_throughput_diff(self):
flags = [
"-applyDiff",
"-v", "ewi",
"-details", detailed_info_file,
"-details", details_info_file,
]
flags += target_flags
flags += base_option_flags
Expand Down Expand Up @@ -3136,7 +3139,7 @@ def replay_with_throughput_diff(self):

print_superpmi_error_result(return_code, self.coreclr_args)

(base_metrics, diff_metrics, _) = aggregate_diff_metrics(detailed_info_file)
(base_metrics, diff_metrics, _) = aggregate_diff_metrics(details_info_file)
print_superpmi_success_result(return_code, base_metrics, diff_metrics)

if base_metrics is not None and diff_metrics is not None:
Expand All @@ -3154,11 +3157,6 @@ def replay_with_throughput_diff(self):
else:
logging.warning("No metric files present?")

if not self.coreclr_args.skip_cleanup:
if os.path.isfile(detailed_info_file):
os.remove(detailed_info_file)
detailed_info_file = None

################################################################################################ end of for mch_file in self.mch_files

# Report the overall results summary of the tpdiff run
Expand Down Expand Up @@ -4773,6 +4771,11 @@ def verify_replay_common_args():
"Specify private_store or set environment variable SUPERPMI_PRIVATE_STORE to use a private store.",
modify_arg=lambda arg: os.environ["SUPERPMI_PRIVATE_STORE"].split(";") if arg is None and "SUPERPMI_PRIVATE_STORE" in os.environ else arg)

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

def verify_base_diff_args():

coreclr_args.verify(args,
Expand Down Expand Up @@ -5109,11 +5112,6 @@ def verify_base_diff_args():
lambda unused: True,
"Unable to set jitoption")

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

jit_in_product_location = False
if coreclr_args.product_location.lower() in coreclr_args.jit_path.lower():
jit_in_product_location = True
Expand Down
Loading