Skip to content

Commit

Permalink
Fix for slots and TXL
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbiggers committed Dec 2, 2024
1 parent e55d690 commit 7f29a9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions scripts/config/replacements_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"PERF_METRICS.FETCH_LATENCY":"topdown\\-fetch\\-lat",
"PERF_METRICS.MEMORY_BOUND":"topdown\\-mem\\-bound",
"TOPDOWN.SLOTS:PERF_METRICS":"slots",
"TOPDOWN.SLOTS:PERCORE":"TOPDOWN.SLOTS",
"TOPDOWN.SLOTS:PERCORE":"slots",
"SLOTS":"slots",
"SOCKET_COUNT":"#num_packages",
"HYPERTHREADING_ON":"#SMT_on",
Expand Down Expand Up @@ -41,7 +41,8 @@
"UNC_DRAM_ENERGY_STATUS":"power@energy\\-ram@",
"INST_RETIRED.ANY_P:SUP":"INST_RETIRED.ANY_P:k",
"BR_INST_RETIRED.FAR_BRANCH:USER":"BR_INST_RETIRED.FAR_BRANCH:u",
"OCR.DEMAND_RFO.L3_MISS:OCR_MSR_VAL=0X103B800002":"cpu@OCR.DEMAND_RFO.L3_MISS\\,offcore_rsp\\=0x103b800002@"
"OCR.DEMAND_RFO.L3_MISS:OCR_MSR_VAL=0X103B800002":"cpu@OCR.DEMAND_RFO.L3_MISS\\,offcore_rsp\\=0x103b800002@",
"UNC_ARB_TRK_OCCUPANCY.DATA_READ:c1":"UNC_ARB_TRK_OCCUPANCY.DATA_READ@cmask\\=0x1@"
},
"metric_source_events":{
"CHAS_PER_SOCKET":"UNC_CHA([^\\s]*)",
Expand Down
4 changes: 2 additions & 2 deletions scripts/perf_format_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def get_expression(self, metric, platform):
if "topdown" in expression and "slots" not in expression:
expression = "( " + expression + " ) + ( 0 * slots )"

return expression
return expression.replace("TXL", "TxL")
else:
print("Error: TMA metric without base formula found")
# Non TMA metric
Expand Down Expand Up @@ -325,7 +325,7 @@ def get_expression(self, metric, platform):
sys.exit("Error in input JSON format during get_expressions(): " + str(error) + ". Exiting")

# Remove any extra spaces in expression
return re.sub(r"[\s]{2,}", " ", expression.strip())
return re.sub(r"[\s]{2,}", " ", expression.strip()).replace("TXL", "TxL")

def get_public_description(self, metric):
"""
Expand Down

0 comments on commit 7f29a9d

Please sign in to comment.