diff mbox series

[RFC,v2,5/6] perf vendor events arm64: Add PE utilization metrics for neoverse-n2

Message ID 1668411720-3581-6-git-send-email-renyu.zj@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series Add metrics for neoverse-n2 | expand

Commit Message

Jing Zhang Nov. 14, 2022, 7:41 a.m. UTC
Add PE utilization related metrics.

Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
---
 .../arch/arm64/arm/neoverse-n2/metrics.json        | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
diff mbox series

Patch

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 e960a66..3c14971 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
@@ -152,5 +152,33 @@ 
         "BriefDescription": "The rate of branches mis-predited to the overall branches",
         "MetricGroup": "Branch",
         "MetricName": "branch_miss_pred_rate"
+    },
+    {
+        "MetricExpr": "instructions / CPU_CYCLES",
+        "PublicDescription": "The average number of instructions executed for each cycle.",
+        "BriefDescription": "Instructions per cycle",
+        "MetricGroup": "PEutilization",
+        "MetricName": "ipc"
+    },
+    {
+        "MetricExpr": "OP_RETIRED / OP_SPEC",
+        "PublicDescription": "Fraction of operations retired",
+        "BriefDescription": "Fraction of operations retired",
+        "MetricGroup": "PEutilization",
+        "MetricName": "retired_rate"
+    },
+    {
+        "MetricExpr": "1 - OP_RETIRED / OP_SPEC",
+        "PublicDescription": "Fraction of operations wasted",
+        "BriefDescription": "Fraction of operations wasted",
+        "MetricGroup": "PEutilization",
+        "MetricName": "wasted_rate"
+    },
+    {
+        "MetricExpr": "(1 - STALL_SLOT / (CPU_CYCLES * 5)) * OP_RETIRED / OP_SPEC",
+        "PublicDescription": "Utilization of CPU",
+        "BriefDescription": "Utilization of CPU",
+        "MetricGroup": "PEutilization",
+        "MetricName": "cpu_utilization"
     }
 ]
\ No newline at end of file