Skip to content

Commit 182f12f

Browse files
ilkka-koskinennamhyung
authored andcommitted
perf vendor events arm64 AmpereOneX: Fix frontend_bound calculation
frontend_bound metrics was miscalculated due to different scaling in a couple of metrics it depends on. Change the scaling to match with AmpereOne. Fixes: 16438b6 ("perf vendor events arm64 AmpereOneX: Add core PMU events and metrics") Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com> Reviewed-by: James Clark <james.clark@linaro.org> Link: https://lore.kernel.org/r/20250313201559.11332-3-ilkka@os.amperecomputing.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent c0b60ce commit 182f12f

File tree

1 file changed

+5
-5
lines changed
  • tools/perf/pmu-events/arch/arm64/ampere/ampereonex

1 file changed

+5
-5
lines changed

tools/perf/pmu-events/arch/arm64/ampere/ampereonex/metrics.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,19 @@
229229
},
230230
{
231231
"MetricName": "slots_lost_misspeculation_fraction",
232-
"MetricExpr": "(OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots)",
232+
"MetricExpr": "100 * (OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots)",
233233
"BriefDescription": "Fraction of slots lost due to misspeculation",
234234
"DefaultMetricgroupName": "TopdownL1",
235235
"MetricGroup": "Default;TopdownL1",
236-
"ScaleUnit": "100percent of slots"
236+
"ScaleUnit": "1percent of slots"
237237
},
238238
{
239239
"MetricName": "retired_fraction",
240-
"MetricExpr": "OP_RETIRED / (CPU_CYCLES * #slots)",
240+
"MetricExpr": "100 * OP_RETIRED / (CPU_CYCLES * #slots)",
241241
"BriefDescription": "Fraction of slots retiring, useful work",
242242
"DefaultMetricgroupName": "TopdownL1",
243243
"MetricGroup": "Default;TopdownL1",
244-
"ScaleUnit": "100percent of slots"
244+
"ScaleUnit": "1percent of slots"
245245
},
246246
{
247247
"MetricName": "backend_core",
@@ -266,7 +266,7 @@
266266
},
267267
{
268268
"MetricName": "frontend_bandwidth",
269-
"MetricExpr": "frontend_bound - frontend_latency",
269+
"MetricExpr": "frontend_bound - 100 * frontend_latency",
270270
"BriefDescription": "Fraction of slots the CPU did not dispatch at full bandwidth - able to dispatch partial slots only (1, 2, or 3 uops)",
271271
"MetricGroup": "TopdownL2",
272272
"ScaleUnit": "1percent of slots"

0 commit comments

Comments
 (0)