Skip to content

Commit

Permalink
Fix PMU for UNC_CLOCK.SOCKET on BDW, HSW, SKL
Browse files Browse the repository at this point in the history
The PMU uncore_clock isn't present on Skylake and earlier
machines. The event is present on cbox_0 (note, the suffix is included
to avoid multiple cbox PMUs being added together).
  • Loading branch information
captain5050 committed May 8, 2024
1 parent 1424ebf commit bb63de4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/create_perf_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def topic(event_name: str, unit: str) -> str:
'cha': 'Uncore-Cache',
'chacms': 'Uncore-Cache',
'cbox': 'Uncore-Cache',
'cbox_0': 'Uncore-Cache',
'ha': 'Uncore-Cache',
'hac_cbo': 'Uncore-Cache',
'b2cxl': 'Uncore-CXL',
Expand Down Expand Up @@ -342,7 +343,7 @@ def get(key: str) -> str:
if self.unit in unit_fixups:
self.unit = unit_fixups[self.unit]
elif self.unit == "NCU" and self.event_name == "UNC_CLOCK.SOCKET":
self.unit = "CLOCK"
self.unit = "cbox_0" if shortname in ['BDW', 'HSW', 'SKL'] else "CLOCK"
elif self.event_name.startswith("UNC_P_POWER_STATE_OCCUPANCY"):
# Older uncore_pcu PMUs don't have a umask, fix to occ_sel.
assert self.unit == "PCU"
Expand Down

0 comments on commit bb63de4

Please sign in to comment.