perf vendor events: Add JSON metrics for Arm CMN
authorJing Zhang <renyu.zj@linux.alibaba.com>
Wed, 27 Sep 2023 05:59:51 +0000 (13:59 +0800)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 28 Sep 2023 04:03:19 +0000 (21:03 -0700)
Add JSON metrics for Arm CMN. Currently just add part of CMN PMU
metrics which are general and compatible for any SoC with CMN-ANY.

Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Tested-by: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: Zhuo Song <zhuo.song@linux.alibaba.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-doc@vger.kernel.org
Link: https://lore.kernel.org/r/1695794391-34817-8-git-send-email-renyu.zj@linux.alibaba.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json [new file with mode: 0644]

diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metric.json
new file mode 100644 (file)
index 0000000..f7823bd
--- /dev/null
@@ -0,0 +1,74 @@
+[
+       {
+               "MetricName": "slc_miss_rate",
+               "BriefDescription": "The system level cache miss rate.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access",
+               "ScaleUnit": "100%",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "hnf_message_retry_rate",
+               "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd",
+               "ScaleUnit": "100%",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "sf_hit_rate",
+               "BriefDescription": "Snoop filter hit rate can be used to measure the snoop filter efficiency.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access",
+               "ScaleUnit": "100%",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "mc_message_retry_rate",
+               "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "hnf_mc_retries / hnf_mc_reqs",
+               "ScaleUnit": "100%",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "rni_actual_read_bandwidth.all",
+               "BriefDescription": "This event measure the actual bandwidth that RN-I bridge sends to the interconnect.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time",
+               "ScaleUnit": "1MB/s",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "rni_actual_write_bandwidth.all",
+               "BriefDescription": "This event measures the actual write bandwidth at RN-I bridges.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time",
+               "ScaleUnit": "1MB/s",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "rni_retry_rate",
+               "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total",
+               "ScaleUnit": "100%",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       },
+       {
+               "MetricName": "sbsx_actual_write_bandwidth.all",
+               "BriefDescription": "sbsx actual write bandwidth.",
+               "MetricGroup": "cmn",
+               "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time",
+               "ScaleUnit": "1MB/s",
+               "Unit": "arm_cmn",
+               "Compat": "(434|436|43c|43a).*"
+       }
+]