[PATCH v3 5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2

From: Jing Zhang
Date: Thu Nov 24 2022 - 12:15:21 EST


Add PE utilization related metrics.

Signed-off-by: Jing Zhang <renyu.zj@xxxxxxxxxxxxxxxxx>
---
.../arch/arm64/arm/neoverse-n2/metrics.json | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)

diff --git a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json
index 23c7d62..7b54819 100644
--- a/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json
+++ b/tools/perf/pmu-events/arch/arm64/arm/neoverse-n2/metrics.json
@@ -189,5 +189,50 @@
"MetricGroup": "Branch",
"MetricName": "branch_miss_pred_rate",
"ScaleUnit": "100%"
+ },
+ {
+ "MetricExpr": "instructions / CPU_CYCLES",
+ "PublicDescription": "The average number of instructions executed for each cycle.",
+ "BriefDescription": "Instructions per cycle",
+ "MetricGroup": "PEutilization",
+ "MetricName": "ipc"
+ },
+ {
+ "MetricExpr": "INST_RETIRED / CPU_CYCLES",
+ "PublicDescription": "Architecturally executed Instructions Per Cycle (IPC)",
+ "BriefDescription": "Architecturally executed Instructions Per Cycle (IPC)",
+ "MetricGroup": "PEutilization",
+ "MetricName": "retired_ipc"
+ },
+ {
+ "MetricExpr": "INST_SPEC / CPU_CYCLES",
+ "PublicDescription": "Speculatively executed Instructions Per Cycle (IPC)",
+ "BriefDescription": "Speculatively executed Instructions Per Cycle (IPC)",
+ "MetricGroup": "PEutilization",
+ "MetricName": "spec_ipc"
+ },
+ {
+ "MetricExpr": "OP_RETIRED / OP_SPEC",
+ "PublicDescription": "Fraction of operations retired",
+ "BriefDescription": "Fraction of operations retired",
+ "MetricGroup": "PEutilization",
+ "MetricName": "retired_rate",
+ "ScaleUnit": "100%"
+ },
+ {
+ "MetricExpr": "1 - OP_RETIRED / OP_SPEC",
+ "PublicDescription": "Fraction of operations wasted",
+ "BriefDescription": "Fraction of operations wasted",
+ "MetricGroup": "PEutilization",
+ "MetricName": "wasted_rate",
+ "ScaleUnit": "100%"
+ },
+ {
+ "MetricExpr": "OP_RETIRED / OP_SPEC * (1 - (STALL_SLOT - CPU_CYCLES) / (CPU_CYCLES * 5))",
+ "PublicDescription": "Utilization of CPU",
+ "BriefDescription": "Utilization of CPU",
+ "MetricGroup": "PEutilization",
+ "MetricName": "cpu_utilization",
+ "ScaleUnit": "100%"
}
]
--
1.8.3.1