
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ICRSOQ ---------------------------------------------------------------------- a) Add support for HiSilicon NOC PMU aliasing and four events are supported: · Count the number of retry data flits clockwise/counterclockwise between subsys and Ring; · Count the number of clockwise/counterclockwise main Ring data flits; · Count the number of data buffer full between Ring and subsys; · Count the number of data flits between Ring and subsys. b) Add support for Hisilicon NOC PMU perf metric: · Average data bandwidth between subsys and Ring; · Average data bandwidth of clockwise/counterclockwise main Ring. Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> Signed-off-by: Qizhi Zhang <zhangqizhi3@h-partners.com> Signed-off-by: JiangShui Yang <yangjiangshui@h-partners.com> --- .../arm64/hisilicon/hip09/sys/uncore-noc.json | 158 -------- .../arm64/hisilicon/hip12/sys/uncore-noc.json | 365 ++++++++++++++++++ tools/perf/pmu-events/jevents.py | 1 + 3 files changed, 366 insertions(+), 158 deletions(-) delete mode 100644 tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-noc.json create mode 100644 tools/perf/pmu-events/arch/arm64/hisilicon/hip12/sys/uncore-noc.json diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-noc.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-noc.json deleted file mode 100644 index c45edcb8ebf9..000000000000 --- a/tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-noc.json +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "EventCode": "0x0e", - "EventName": "noc_cycles", - "BriefDescription": "Count of noc cycles", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x0e", - "EventName": "cycles", - "BriefDescription": "Count of noc cycles", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x01", - "EventName": "cw_ingress_fail", - "BriefDescription": "Count the number of retry data flits clockwise from subsys to Ring", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x03", - "EventName": "cw_egress_fail", - "BriefDescription": "Count the number of retry data flits clockwise from Ring to subsys", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x09", - "EventName": "cc_ingress_fail", - "BriefDescription": "Count the number of retry data flits counterclockwise from subsys to Ring", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x0b", - "EventName": "cc_egress_fail", - "BriefDescription": "Count the number of retry data flits counterclockwise from Ring to subsys", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x05", - "EventName": "cw_main_flow_sum", - "BriefDescription": "Count the number of clockwise main Ring data flits", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x0d", - "EventName": "cc_main_flow_sum", - "BriefDescription": "Count the number of counterclockwise main Ring data flits", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x12", - "EventName": "egress_buf_full", - "BriefDescription": "Count the number of data buffer full from Ring to subsys", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x17", - "EventName": "egress_flow_sum", - "BriefDescription": "Count the number of data flits from Ring to subsys", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x19", - "EventName": "ingress_buf_full", - "BriefDescription": "Count the number of data buffer full from subsys to Ring", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "EventCode": "0x1a", - "EventName": "ingress_flow_sum", - "BriefDescription": "Count the number of data flits from subsys to Ring", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "ingress_flow_bw", - "MetricExpr": "ingress_flow_sum * 64 / duration_time / 1e6", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth from subsys to Ring", - "ScaleUnit": "1MB/s", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "ingress_flow_bw_occupancy", - "MetricExpr": "ingress_flow_sum / noc_cycles", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth occupancy from subsys to Ring", - "ScaleUnit": "100%", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "egress_flow_bw", - "MetricExpr": "egress_flow_sum * 64 / duration_time / 1e6", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth from Ring to subsys", - "ScaleUnit": "1MB/s", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "egress_flow_bw_occupancy", - "MetricExpr": "egress_flow_sum / noc_cycles", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth occupancy from Ring to subsys", - "ScaleUnit": "100%", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "cw_main_flow_bw", - "MetricExpr": "cw_main_flow_sum * 64 / duration_time / 1e6", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth of clockwise main Ring", - "ScaleUnit": "1MB/s", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "cw_main_flow_bw_occupancy", - "MetricExpr": "cw_main_flow_sum / noc_cycles", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth occupancy of clockwise main Ring", - "ScaleUnit": "100%", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "cw_main_flow_bw", - "MetricExpr": "cc_main_flow_sum * 64 / duration_time / 1e6", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth of counterclockwise main Ring", - "ScaleUnit": "1MB/s", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - }, - { - "MetricName": "cw_main_flow_bw_occupancy", - "MetricExpr": "cc_main_flow_sum / noc_cycles", - "MetricGroup": "NOC_bw", - "BriefDescription": "Average data bandwidth occupancy of counterclockwise main Ring", - "ScaleUnit": "100%", - "Compat": "0x00000000", - "Unit": "hisi_scl,noc" - } -] diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip12/sys/uncore-noc.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip12/sys/uncore-noc.json new file mode 100644 index 000000000000..bcdcac9e25ab --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip12/sys/uncore-noc.json @@ -0,0 +1,365 @@ +[ + { + "ConfigCode": "0x0e", + "EventName": "cycles", + "BriefDescription": "Count of noc cycles", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x1a", + "EventName": "req_ingress_flow_sum", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel data flits from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x1a", + "EventName": "snp_ingress_flow_sum", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel data flits from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x1a", + "EventName": "rsp_ingress_flow_sum", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel data flits from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x1a", + "EventName": "ingress_flow_sum", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel data flits from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x17", + "EventName": "req_egress_flow_sum", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel data flits from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x17", + "EventName": "snp_egress_flow_sum", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel data flits from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x17", + "EventName": "rsp_egress_flow_sum", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel data flits from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x17", + "EventName": "egress_flow_sum", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel data flits from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x19", + "EventName": "req_ingress_buf_full", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel data buffer full from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x19", + "EventName": "snp_ingress_buf_full", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel data buffer full from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x19", + "EventName": "rsp_ingress_buf_full", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel data buffer full from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x19", + "EventName": "ingress_buf_full", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel data buffer full from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x12", + "EventName": "req_egress_buf_full", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel data buffer full from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x12", + "EventName": "snp_egress_buf_full", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel data buffer full from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x12", + "EventName": "rsp_egress_buf_full", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel data buffer full from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x12", + "EventName": "egress_buf_full", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel data buffer full from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x05", + "EventName": "req_cw_main_flow_sum", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel clockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x05", + "EventName": "snp_cw_main_flow_sum", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel clockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x05", + "EventName": "rsp_cw_main_flow_sum", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel clockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x05", + "EventName": "cw_main_flow_sum", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel clockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0d", + "EventName": "req_cc_main_flow_sum", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel counterclockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0d", + "EventName": "snp_cc_main_flow_sum", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel counterclockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0d", + "EventName": "rsp_cc_main_flow_sum", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel counterclockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0d", + "EventName": "cc_main_flow_sum", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel counterclockwise main Ring data flits", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x01", + "EventName": "req_cw_ingress_fail", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel retry data flits clockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x01", + "EventName": "snp_cw_ingress_fail", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel retry data flits clockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x01", + "EventName": "rsp_cw_ingress_fail", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel retry data flits clockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x01", + "EventName": "cw_ingress_fail", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel retry data flits clockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x09", + "EventName": "req_cc_ingress_fail", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel retry data flits counterclockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x09", + "EventName": "snp_cc_ingress_fail", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel retry data flits counterclockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x09", + "EventName": "rsp_cc_ingress_fail", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel retry data flits counterclockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x09", + "EventName": "cc_ingress_fail", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel retry data flits counterclockwise from subsys to Ring", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x03", + "EventName": "req_cw_egress_fail", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel retry data flits clockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x03", + "EventName": "snp_cw_egress_fail", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel retry data flits clockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x03", + "EventName": "rsp_cw_egress_fail", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel retry data flits clockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x03", + "EventName": "cw_egress_fail", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel retry data flits clockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0b", + "EventName": "req_cc_egress_fail", + "Filter": "ch=2", + "BriefDescription": "Count the number of req channel retry data flits counterclockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0b", + "EventName": "snp_cc_egress_fail", + "Filter": "ch=4", + "BriefDescription": "Count the number of snp channel retry data flits counterclockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0b", + "EventName": "rsp_cc_egress_fail", + "Filter": "ch=6", + "BriefDescription": "Count the number of rsp channel retry data flits counterclockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "ConfigCode": "0x0b", + "EventName": "cc_egress_fail", + "Filter": "ch=7", + "BriefDescription": "Count the number of data channel retry data flits counterclockwise from Ring to subsys", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "MetricName": "ingress_flow_bw", + "MetricExpr": "ingress_flow_sum * 64 / duration_time / 1e6", + "MetricGroup": "NoC_bw", + "BriefDescription": "Average data bandwidth from subsys to Ring", + "ScaleUnit": "1MB/s", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "MetricName": "egress_flow_bw", + "MetricExpr": "egress_flow_sum * 64 / duration_time / 1e6", + "MetricGroup": "NoC_bw", + "BriefDescription": "Average data bandwidth from Ring to subsys", + "ScaleUnit": "1MB/s", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "MetricName": "cw_main_flow_bw", + "MetricExpr": "cw_main_flow_sum * 64 / duration_time / 1e6", + "MetricGroup": "NoC_bw", + "BriefDescription": "Average data bandwidth of clockwise main Ring", + "ScaleUnit": "1MB/s", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + }, + { + "MetricName": "cc_main_flow_bw", + "MetricExpr": "cc_main_flow_sum * 64 / duration_time / 1e6", + "MetricGroup": "NoC_bw", + "BriefDescription": "Average data bandwidth of counterclockwise main Ring", + "ScaleUnit": "1MB/s", + "Compat": "0x00000000", + "Unit": "hisi_scl,noc" + } +] diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index a89fc42278f0..0612dcef48c4 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -283,6 +283,7 @@ class JsonEvent: 'hisi_sccl,ddrc': 'hisi_sccl,ddrc', 'hisi_sccl,hha': 'hisi_sccl,hha', 'hisi_sccl,l3c': 'hisi_sccl,l3c', + 'hisi_scl,noc': 'hisi_scl,noc', 'imx8_ddr': 'imx8_ddr', 'L3PMC': 'amd_l3', 'DFPMC': 'amd_df', -- 2.43.0