[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250829033138.4166591-10-irogers@google.com>
Date: Thu, 28 Aug 2025 20:31:34 -0700
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, James Clark <james.clark@...aro.org>,
Xu Yang <xu.yang_2@....com>, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, John Garry <john.g.garry@...cle.com>,
Jing Zhang <renyu.zj@...ux.alibaba.com>, Sandipan Das <sandipan.das@....com>,
Benjamin Gray <bgray@...ux.ibm.com>
Subject: [PATCH v5 09/13] perf jevents: Add uncore l3 metric group for AMD
Metrics use the amd_l3 PMU for access/miss/hit information.
Signed-off-by: Ian Rogers <irogers@...gle.com>
---
tools/perf/pmu-events/amd_metrics.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/perf/pmu-events/amd_metrics.py b/tools/perf/pmu-events/amd_metrics.py
index 38ff7d1caafe..71500ea2204f 100755
--- a/tools/perf/pmu-events/amd_metrics.py
+++ b/tools/perf/pmu-events/amd_metrics.py
@@ -466,6 +466,22 @@ def Rapl() -> MetricGroup:
return MetricGroup("lpm_cpu_power", metrics,
description="Processor socket power consumption estimates")
+def UncoreL3():
+ acc = Event("l3_lookup_state.all_coherent_accesses_to_l3",
+ "l3_lookup_state.all_l3_req_typs")
+ miss = Event("l3_lookup_state.l3_miss",
+ "l3_comb_clstr_state.request_miss")
+ acc = max(acc, miss)
+ hits = acc - miss
+
+ return MetricGroup("lpm_l3", [
+ Metric("lpm_l3_accesses", "L3 victim cache accesses",
+ d_ratio(acc, interval_sec), "accesses/sec"),
+ Metric("lpm_l3_hits", "L3 victim cache hit rate", d_ratio(hits, acc), "100%"),
+ Metric("lpm_l3_miss", "L3 victim cache miss rate", d_ratio(miss, acc),
+ "100%"),
+ ], description="L3 cache breakdown per CCX")
+
def main() -> None:
global _args
@@ -501,6 +517,7 @@ def main() -> None:
AmdUpc(),
Idle(),
Rapl(),
+ UncoreL3(),
])
if _args.metricgroups:
--
2.51.0.318.gd7df087d1a-goog
Powered by blists - more mailing lists