Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 16438b652b46 ("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>

authored by

Ilkka Koskinen and committed by
Namhyung Kim
182f12f3 c0b60ce4

+5 -5
+5 -5
tools/perf/pmu-events/arch/arm64/ampere/ampereonex/metrics.json
··· 229 229 }, 230 230 { 231 231 "MetricName": "slots_lost_misspeculation_fraction", 232 - "MetricExpr": "(OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots)", 232 + "MetricExpr": "100 * (OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots)", 233 233 "BriefDescription": "Fraction of slots lost due to misspeculation", 234 234 "DefaultMetricgroupName": "TopdownL1", 235 235 "MetricGroup": "Default;TopdownL1", 236 - "ScaleUnit": "100percent of slots" 236 + "ScaleUnit": "1percent of slots" 237 237 }, 238 238 { 239 239 "MetricName": "retired_fraction", 240 - "MetricExpr": "OP_RETIRED / (CPU_CYCLES * #slots)", 240 + "MetricExpr": "100 * OP_RETIRED / (CPU_CYCLES * #slots)", 241 241 "BriefDescription": "Fraction of slots retiring, useful work", 242 242 "DefaultMetricgroupName": "TopdownL1", 243 243 "MetricGroup": "Default;TopdownL1", 244 - "ScaleUnit": "100percent of slots" 244 + "ScaleUnit": "1percent of slots" 245 245 }, 246 246 { 247 247 "MetricName": "backend_core", ··· 266 266 }, 267 267 { 268 268 "MetricName": "frontend_bandwidth", 269 - "MetricExpr": "frontend_bound - frontend_latency", 269 + "MetricExpr": "frontend_bound - 100 * frontend_latency", 270 270 "BriefDescription": "Fraction of slots the CPU did not dispatch at full bandwidth - able to dispatch partial slots only (1, 2, or 3 uops)", 271 271 "MetricGroup": "TopdownL2", 272 272 "ScaleUnit": "1percent of slots"