perf vendor events arm64: Add PE utilization metrics for neoverse-n2-v2

Add PE utilization related metrics. In cpu_utilization metric, if it is
neoverse-n2 which slots are 5, the real stall_slot need to subtract the
cpu_cycles according to the neoverse-n2 errata [0].

[0] https://documentation-service.arm.com/static/636a66a64e6cf12278ad89cb?token=

Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrew Kilroy <andrew.kilroy@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: Will Deacon <will@kernel.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Cc: Zhuo Song <zhuo.song@linux.alibaba.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/1673940573-90503-9-git-send-email-renyu.zj@linux.alibaba.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jing Zhang 2023-01-17 15:29:32 +08:00 committed by Arnaldo Carvalho de Melo
parent a1adade799
commit 4befa5cf84

View file

@ -160,5 +160,51 @@
"MetricGroup": "Branch",
"MetricName": "branch_miss_pred_rate",
"ScaleUnit": "100%"
},
{
"MetricExpr": "instructions / CPU_CYCLES",
"BriefDescription": "The average number of instructions executed for each cycle.",
"MetricGroup": "PEutilization",
"MetricName": "ipc"
},
{
"MetricExpr": "ipc / 5",
"BriefDescription": "IPC percentage of peak. The peak of IPC is 5.",
"MetricGroup": "PEutilization",
"MetricName": "ipc_rate",
"ScaleUnit": "100%"
},
{
"MetricExpr": "INST_RETIRED / CPU_CYCLES",
"BriefDescription": "Architecturally executed Instructions Per Cycle (IPC)",
"MetricGroup": "PEutilization",
"MetricName": "retired_ipc"
},
{
"MetricExpr": "INST_SPEC / CPU_CYCLES",
"BriefDescription": "Speculatively executed Instructions Per Cycle (IPC)",
"MetricGroup": "PEutilization",
"MetricName": "spec_ipc"
},
{
"MetricExpr": "OP_RETIRED / OP_SPEC",
"BriefDescription": "Of all the micro-operations issued, what percentage are retired(committed)",
"MetricGroup": "PEutilization",
"MetricName": "retired_rate",
"ScaleUnit": "100%"
},
{
"MetricExpr": "1 - OP_RETIRED / OP_SPEC",
"BriefDescription": "Of all the micro-operations issued, what percentage are not retired(committed)",
"MetricGroup": "PEutilization",
"MetricName": "wasted_rate",
"ScaleUnit": "100%"
},
{
"MetricExpr": "OP_RETIRED / OP_SPEC * (1 - (STALL_SLOT if (#slots - 5) else (STALL_SLOT - CPU_CYCLES)) / (#slots * CPU_CYCLES))",
"BriefDescription": "The truly effective ratio of micro-operations executed by the CPU, which means that misprediction and stall are not included",
"MetricGroup": "PEutilization",
"MetricName": "cpu_utilization",
"ScaleUnit": "100%"
}
]