[v3,3/7] perf vendor events: Add JSON metrics for CMN

Message ID 1685438374-33287-4-git-send-email-renyu.zj@linux.alibaba.com
State New
Headers
Series Add JSON metrics for arm CMN and Yitian710 DDR |

Commit Message

Jing Zhang May 30, 2023, 9:19 a.m. UTC
  Add JSON metrics for arm CMN. Currently just add part of CMN PMU
metrics which are general and compatible for any SoC and CMN-ANY.

Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
---
 .../pmu-events/arch/arm64/arm/cmn/sys/metrics.json | 74 ++++++++++++++++++++++
 tools/perf/pmu-events/jevents.py                   |  1 +
 2 files changed, 75 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
  

Comments

Ian Rogers May 31, 2023, 1:18 a.m. UTC | #1
On Tue, May 30, 2023 at 2:19 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote:
>
> Add JSON metrics for arm CMN. Currently just add part of CMN PMU
> metrics which are general and compatible for any SoC and CMN-ANY.
>
> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
> ---
>  .../pmu-events/arch/arm64/arm/cmn/sys/metrics.json | 74 ++++++++++++++++++++++
>  tools/perf/pmu-events/jevents.py                   |  1 +
>  2 files changed, 75 insertions(+)
>  create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>
> diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
> new file mode 100644
> index 0000000..e70ac1a
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
> @@ -0,0 +1,74 @@
> +[
> +       {
> +               "MetricName": "slc_miss_rate",
> +               "BriefDescription": "The system level cache miss rate include.",

Nit, partial sentence?

> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access",
> +               "ScaleUnit": "100%",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "hnf_message_retry_rate",
> +               "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.",
> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd",
> +               "ScaleUnit": "100%",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "sf_hit_rate",
> +               "BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.",

Nit, inconsistent capitalization?

> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access",
> +               "ScaleUnit": "100%",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "mc_message_retry_rate",
> +               "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.",
> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "hnf_mc_retries / hnf_mc_reqs",
> +               "ScaleUnit": "100%",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "rni_actual_read_bandwidth.all",
> +               "BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.",

Nit, the MB/sec is in the ScaleUnit so could be dropped here.

> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time",
> +               "ScaleUnit": "1MB/s",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "rni_actual_write_bandwidth.all",
> +               "BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.",

Nit, same thing.

> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time",
> +               "ScaleUnit": "1MB/s",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "rni_retry_rate",
> +               "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.",
> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total",
> +               "ScaleUnit": "100%",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       },
> +       {
> +               "MetricName": "sbsx_actual_write_bandwidth.all",
> +               "BriefDescription": "sbsx actual write bandwidth(MB/sec).",

Nit, same thing.

Thanks,
Ian

> +               "MetricGroup": "arm_cmn",
> +               "MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time",
> +               "ScaleUnit": "1MB/s",
> +               "Unit": "arm_cmn",
> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +       }
> +]
> diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
> index 2bcd07c..7cff2c6 100755
> --- a/tools/perf/pmu-events/jevents.py
> +++ b/tools/perf/pmu-events/jevents.py
> @@ -256,6 +256,7 @@ class JsonEvent:
>            'DFPMC': 'amd_df',
>            'cpu_core': 'cpu_core',
>            'cpu_atom': 'cpu_atom',
> +          'arm_cmn': 'arm_cmn',
>        }
>        return table[unit] if unit in table else f'uncore_{unit.lower()}'
>
> --
> 1.8.3.1
>
  
Shuai Xue May 31, 2023, 2:43 a.m. UTC | #2
On 2023/5/30 17:19, Jing Zhang wrote:
> Add JSON metrics for arm CMN. Currently just add part of CMN PMU
> metrics which are general and compatible for any SoC and CMN-ANY.

Is it a typo? You mean "any SoC integration with CMN-ANY" right?

Thanks,
Shuai

> 
> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
> ---
>  .../pmu-events/arch/arm64/arm/cmn/sys/metrics.json | 74 ++++++++++++++++++++++
>  tools/perf/pmu-events/jevents.py                   |  1 +
>  2 files changed, 75 insertions(+)
>  create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
> 
> diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
> new file mode 100644
> index 0000000..e70ac1a
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
> @@ -0,0 +1,74 @@
> +[
> +	{
> +		"MetricName": "slc_miss_rate",
> +		"BriefDescription": "The system level cache miss rate include.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access",
> +		"ScaleUnit": "100%",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "hnf_message_retry_rate",
> +		"BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd",
> +		"ScaleUnit": "100%",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "sf_hit_rate",
> +		"BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access",
> +		"ScaleUnit": "100%",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "mc_message_retry_rate",
> +		"BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "hnf_mc_retries / hnf_mc_reqs",
> +		"ScaleUnit": "100%",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "rni_actual_read_bandwidth.all",
> +		"BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time",
> +		"ScaleUnit": "1MB/s",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "rni_actual_write_bandwidth.all",
> +		"BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time",
> +		"ScaleUnit": "1MB/s",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "rni_retry_rate",
> +		"BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total",
> +		"ScaleUnit": "100%",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	},
> +	{
> +		"MetricName": "sbsx_actual_write_bandwidth.all",
> +		"BriefDescription": "sbsx actual write bandwidth(MB/sec).",
> +		"MetricGroup": "arm_cmn",
> +		"MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time",
> +		"ScaleUnit": "1MB/s",
> +		"Unit": "arm_cmn",
> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
> +	}
> +]
> diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
> index 2bcd07c..7cff2c6 100755
> --- a/tools/perf/pmu-events/jevents.py
> +++ b/tools/perf/pmu-events/jevents.py
> @@ -256,6 +256,7 @@ class JsonEvent:
>            'DFPMC': 'amd_df',
>            'cpu_core': 'cpu_core',
>            'cpu_atom': 'cpu_atom',
> +          'arm_cmn': 'arm_cmn',
>        }
>        return table[unit] if unit in table else f'uncore_{unit.lower()}'
>
  
Jing Zhang June 1, 2023, 9:03 a.m. UTC | #3
在 2023/5/31 上午9:18, Ian Rogers 写道:
> On Tue, May 30, 2023 at 2:19 AM Jing Zhang <renyu.zj@linux.alibaba.com> wrote:
>>
>> Add JSON metrics for arm CMN. Currently just add part of CMN PMU
>> metrics which are general and compatible for any SoC and CMN-ANY.
>>
>> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
>> ---
>>  .../pmu-events/arch/arm64/arm/cmn/sys/metrics.json | 74 ++++++++++++++++++++++
>>  tools/perf/pmu-events/jevents.py                   |  1 +
>>  2 files changed, 75 insertions(+)
>>  create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>>
>> diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>> new file mode 100644
>> index 0000000..e70ac1a
>> --- /dev/null
>> +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>> @@ -0,0 +1,74 @@
>> +[
>> +       {
>> +               "MetricName": "slc_miss_rate",
>> +               "BriefDescription": "The system level cache miss rate include.",
> 
> Nit, partial sentence?

Yes my mistake.

> 
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access",
>> +               "ScaleUnit": "100%",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "hnf_message_retry_rate",
>> +               "BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.",
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd",
>> +               "ScaleUnit": "100%",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "sf_hit_rate",
>> +               "BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.",
> 
> Nit, inconsistent capitalization?

Ok, fix it in next version.

> 
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access",
>> +               "ScaleUnit": "100%",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "mc_message_retry_rate",
>> +               "BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.",
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "hnf_mc_retries / hnf_mc_reqs",
>> +               "ScaleUnit": "100%",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "rni_actual_read_bandwidth.all",
>> +               "BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.",
> 
> Nit, the MB/sec is in the ScaleUnit so could be dropped here.

ok

> 
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time",
>> +               "ScaleUnit": "1MB/s",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "rni_actual_write_bandwidth.all",
>> +               "BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.",
> 
> Nit, same thing.

ok

> 
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time",
>> +               "ScaleUnit": "1MB/s",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "rni_retry_rate",
>> +               "BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.",
>> +               "MetricGroup": "arm_cmn",
>> +               "MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total",
>> +               "ScaleUnit": "100%",
>> +               "Unit": "arm_cmn",
>> +               "Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +       },
>> +       {
>> +               "MetricName": "sbsx_actual_write_bandwidth.all",
>> +               "BriefDescription": "sbsx actual write bandwidth(MB/sec).",
> 
> Nit, same thing.
> 

Ok, Thanks Ian.
  
Jing Zhang June 1, 2023, 9:06 a.m. UTC | #4
在 2023/5/31 上午10:43, Shuai Xue 写道:
> 
> 
> On 2023/5/30 17:19, Jing Zhang wrote:
>> Add JSON metrics for arm CMN. Currently just add part of CMN PMU
>> metrics which are general and compatible for any SoC and CMN-ANY.
> 
> Is it a typo? You mean "any SoC integration with CMN-ANY" right?
> 

Yes, I will fix it in the next version.

Thanks,
Jing

> Thanks,
> Shuai
> 
>>
>> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
>> ---
>>  .../pmu-events/arch/arm64/arm/cmn/sys/metrics.json | 74 ++++++++++++++++++++++
>>  tools/perf/pmu-events/jevents.py                   |  1 +
>>  2 files changed, 75 insertions(+)
>>  create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>>
>> diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>> new file mode 100644
>> index 0000000..e70ac1a
>> --- /dev/null
>> +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
>> @@ -0,0 +1,74 @@
>> +[
>> +	{
>> +		"MetricName": "slc_miss_rate",
>> +		"BriefDescription": "The system level cache miss rate include.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access",
>> +		"ScaleUnit": "100%",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "hnf_message_retry_rate",
>> +		"BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd",
>> +		"ScaleUnit": "100%",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "sf_hit_rate",
>> +		"BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access",
>> +		"ScaleUnit": "100%",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "mc_message_retry_rate",
>> +		"BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "hnf_mc_retries / hnf_mc_reqs",
>> +		"ScaleUnit": "100%",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "rni_actual_read_bandwidth.all",
>> +		"BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time",
>> +		"ScaleUnit": "1MB/s",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "rni_actual_write_bandwidth.all",
>> +		"BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time",
>> +		"ScaleUnit": "1MB/s",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "rni_retry_rate",
>> +		"BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total",
>> +		"ScaleUnit": "100%",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	},
>> +	{
>> +		"MetricName": "sbsx_actual_write_bandwidth.all",
>> +		"BriefDescription": "sbsx actual write bandwidth(MB/sec).",
>> +		"MetricGroup": "arm_cmn",
>> +		"MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time",
>> +		"ScaleUnit": "1MB/s",
>> +		"Unit": "arm_cmn",
>> +		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
>> +	}
>> +]
>> diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
>> index 2bcd07c..7cff2c6 100755
>> --- a/tools/perf/pmu-events/jevents.py
>> +++ b/tools/perf/pmu-events/jevents.py
>> @@ -256,6 +256,7 @@ class JsonEvent:
>>            'DFPMC': 'amd_df',
>>            'cpu_core': 'cpu_core',
>>            'cpu_atom': 'cpu_atom',
>> +          'arm_cmn': 'arm_cmn',
>>        }
>>        return table[unit] if unit in table else f'uncore_{unit.lower()}'
>>
  

Patch

diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
new file mode 100644
index 0000000..e70ac1a
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/metrics.json
@@ -0,0 +1,74 @@ 
+[
+	{
+		"MetricName": "slc_miss_rate",
+		"BriefDescription": "The system level cache miss rate include.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "hnf_cache_miss / hnf_slc_sf_cache_access",
+		"ScaleUnit": "100%",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "hnf_message_retry_rate",
+		"BriefDescription": "HN-F message retry rate indicates whether a lack of credits is causing the bottlenecks.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "hnf_pocq_retry / hnf_pocq_reqs_recvd",
+		"ScaleUnit": "100%",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "sf_hit_rate",
+		"BriefDescription": "Snoop filter hit rate can be used to measure the Snoop Filter efficiency.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "hnf_sf_hit / hnf_slc_sf_cache_access",
+		"ScaleUnit": "100%",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "mc_message_retry_rate",
+		"BriefDescription": "The memory controller request retries rate indicates whether the memory controller is the bottleneck.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "hnf_mc_retries / hnf_mc_reqs",
+		"ScaleUnit": "100%",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "rni_actual_read_bandwidth.all",
+		"BriefDescription": "This event measure the actual bandwidth(MB/sec) that RN-I bridge sends to the interconnect.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "rnid_rxdat_flits * 32 / 1e6 / duration_time",
+		"ScaleUnit": "1MB/s",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "rni_actual_write_bandwidth.all",
+		"BriefDescription": "This event measures the actual write bandwidth(MB/sec) at RN-I bridges.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "rnid_txdat_flits * 32 / 1e6 / duration_time",
+		"ScaleUnit": "1MB/s",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "rni_retry_rate",
+		"BriefDescription": "RN-I bridge retry rate indicates whether the memory controller is the bottleneck.",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "rnid_txreq_flits_retried / rnid_txreq_flits_total",
+		"ScaleUnit": "100%",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	},
+	{
+		"MetricName": "sbsx_actual_write_bandwidth.all",
+		"BriefDescription": "sbsx actual write bandwidth(MB/sec).",
+		"MetricGroup": "arm_cmn",
+		"MetricExpr": "sbsx_txdat_flitv * 32 / 1e6 / duration_time",
+		"ScaleUnit": "1MB/s",
+		"Unit": "arm_cmn",
+		"Compat": "arm_cmn600;arm_cmn650;arm_cmn700;arm_ci700"
+	}
+]
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index 2bcd07c..7cff2c6 100755
--- a/tools/perf/pmu-events/jevents.py
+++ b/tools/perf/pmu-events/jevents.py
@@ -256,6 +256,7 @@  class JsonEvent:
           'DFPMC': 'amd_df',
           'cpu_core': 'cpu_core',
           'cpu_atom': 'cpu_atom',
+          'arm_cmn': 'arm_cmn',
       }
       return table[unit] if unit in table else f'uncore_{unit.lower()}'