diff mbox series

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

Message ID 20210119025647.12569-2-qiangqing.zhang@nxp.com (mailing list archive)
State New, archived
Headers show
Series tools: perf: Add JSON metrics for i.MX8M platforms | expand

Commit Message

Joakim Zhang Jan. 19, 2021, 2:56 a.m. UTC
Add bandwidth metric for imx8mm.

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

Patch

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@read\\-cycles@ + imx8_ddr0@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@read\\-cycles@ + imx8_ddr0@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"
-    }
+   }
 ]