[PATCH V1 1/4] perf vendor events: Add bandwidth metric for imx8mm

Joakim Zhang qiangqing.zhang at nxp.com
Mon Jan 18 21:56:44 EST 2021


Add bandwidth metric for imx8mm.

Signed-off-by: Joakim Zhang <qiangqing.zhang at nxp.com>
---
 .../arm64/freescale/imx8mm/sys/metrics.json   | 20 +++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json
index 8e553b67cae6..615be286ecaf 100644
--- a/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json
+++ b/tools/perf/pmu-events/arch/arm64/freescale/imx8mm/sys/metrics.json
@@ -1,4 +1,20 @@
 [
+   {
+	    "BriefDescription": "bandwidth usage for lpddr4 evk board",
+	    "MetricName": "imx8mm_bandwidth_usage.lpddr4",
+	    "MetricExpr": "(( imx8_ddr0 at read\\-cycles@ + imx8_ddr0 at write\\-cycles@ ) * 4 * 4 / duration_time) / (750 * 1000000 * 4 * 4)",
+	    "ScaleUnit": "1e2%",
+	    "Unit": "imx8_ddr",
+	    "Compat": "i.MX8MM"
+   },
+   {
+	    "BriefDescription": "bandwidth usage for ddr4 evk board",
+	    "MetricName": "imx8mm_bandwidth_usage.ddr4",
+	    "MetricExpr": "(( imx8_ddr0 at read\\-cycles@ + imx8_ddr0 at write\\-cycles@ ) * 4 * 4 / duration_time) / (600 * 1000000 * 4 * 4)",
+	    "ScaleUnit": "1e2%",
+	    "Unit": "imx8_ddr",
+	    "Compat": "i.MX8MM"
+   },
    {
 	    "BriefDescription": "bytes all masters read from ddr based on read-cycles event",
 	    "MetricName": "imx8mm_ddr_read.all",
@@ -6,7 +22,7 @@
 	    "ScaleUnit": "9.765625e-4KB",
 	    "Unit": "imx8_ddr",
 	    "Compat": "i.MX8MM"
-    },
+   },
    {
 	    "BriefDescription": "bytes all masters write to ddr based on write-cycles event",
 	    "MetricName": "imx8mm_ddr_write.all",
@@ -14,5 +30,5 @@
 	    "ScaleUnit": "9.765625e-4KB",
 	    "Unit": "imx8_ddr",
 	    "Compat": "i.MX8MM"
-    }
+   }
 ]
-- 
2.17.1




More information about the linux-arm-kernel mailing list