From bb63de4e60e9c95c131eeb96c3c7742374dd43a0 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 8 May 2024 09:54:28 -0700 Subject: [PATCH] Fix PMU for UNC_CLOCK.SOCKET on BDW, HSW, SKL 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). --- scripts/create_perf_json.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/create_perf_json.py b/scripts/create_perf_json.py index ae5693b3..2a8f21d0 100644 --- a/scripts/create_perf_json.py +++ b/scripts/create_perf_json.py @@ -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', @@ -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"