
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ICRSOQ ---------------------------------------------------------------------- a) Add support for hisilicon L3C PMU perf event: · Add hip12 l3c event in l3c pmu; b) Add support for Hisilicon L3C PMU perf metric: · Average outstanding of l3t event; · Average latency of l3t event; · Average throughput of l3t evnt; 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> --- .../hisilicon/hip12/uncore-l3c-metric.json | 205 ++++++++++ .../arm64/hisilicon/hipxx/sys/uncore-l3c.json | 359 +++++++++++++++++- 2 files changed, 556 insertions(+), 8 deletions(-) create mode 100644 tools/perf/pmu-events/arch/arm64/hisilicon/hip12/uncore-l3c-metric.json diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip12/uncore-l3c-metric.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip12/uncore-l3c-metric.json new file mode 100644 index 000000000000..9b1846bd6fea --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip12/uncore-l3c-metric.json @@ -0,0 +1,205 @@ +[ + { + "MetricName": "l3t_dvmop_ost", + "MetricExpr": "l3t_dvmop_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding DVMOp requests in L3T per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_dvmop_thp", + "MetricExpr": "l3t_dvmop_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of DVMOp requests processed by L3T per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_dvmop_lat", + "MetricExpr": "l3t_dvmop_sum / l3t_dvmop_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of DVMOp requests processed by L3T", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_aq_time_ost", + "MetricExpr": "l3t_aq_time_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding AQ buffer time per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_aq_time_thp", + "MetricExpr": "l3t_aq_time_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of AQ buffer time per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_aq_time_lat", + "MetricExpr": "l3t_aq_time_sum / l3t_aq_time_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of AQ buffer time", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_pq_time_ost", + "MetricExpr": "l3t_pq_time_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding PQ buffer time per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_pq_time_thp", + "MetricExpr": "l3t_pq_time_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of PQ buffer time per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_pq_time_lat", + "MetricExpr": "l3t_pq_time_sum / l3t_pq_time_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of PQ buffer time", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_snp_cpu_ost", + "MetricExpr": "l3t_snp_cpu_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding SNPs sent to CPU per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_snp_cpu_thp", + "MetricExpr": "l3t_snp_cpu_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of SNPs sent to CPU per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_snp_cpu_lat", + "MetricExpr": "l3t_snp_cpu_sum / l3t_snp_cpu_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of SNPs sent to CPU", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_rxsnp_l3t_ost", + "MetricExpr": "l3t_rxsnp_l3t_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding SNPs received by L3T per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_rxsnp_l3t_thp", + "MetricExpr": "l3t_rxsnp_l3t_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of SNPs received by L3T per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_rxsnp_l3t_lat", + "MetricExpr": "l3t_rxsnp_l3t_sum / l3t_rxsnp_l3t_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of SNPs received by L3T", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_rxhydrasnp_l3t_ost", + "MetricExpr": "l3t_rxhydrasnp_l3t_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding HYDRASNPs received by L3T per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_rxhydrasnp_l3t_thp", + "MetricExpr": "l3t_rxhydrasnp_l3t_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of HYDRASNPs received by L3T per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_rxhydrasnp_l3t_lat", + "MetricExpr": "l3t_rxhydrasnp_l3t_sum / l3t_rxhydrasnp_l3t_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of HYDRASNPs received by L3T", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_dbid_l3t_ost", + "MetricExpr": "l3t_dbid_l3t_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding DBIDs returned to CPU per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_dbid_l3t_thp", + "MetricExpr": "l3t_dbid_l3t_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of DBIDs returned to CPU per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_dbid_l3t_lat", + "MetricExpr": "l3t_dbid_l3t_sum / l3t_dbid_l3t_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of DBIDs returned to CPU", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_wrnotram_ost", + "MetricExpr": "l3t_wrnotram_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding write requests to MATA per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_wrnotram_thp", + "MetricExpr": "l3t_wrnotram_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of write requests to MATA per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_wrnotram_lat", + "MetricExpr": "l3t_wrnotram_sum / l3t_wrnotram_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of write requests to MATA", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_retry_ost", + "MetricExpr": "l3t_retry_sum / l3c_cycles", + "MetricGroup": "L3C_OST", + "BriefDescription": "Average number of outstanding retry requests per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_retry_thp", + "MetricExpr": "l3t_retry_alloc / l3c_cycles", + "MetricGroup": "L3C_THP", + "BriefDescription": "Average throughput of retry requests per cycle", + "ScaleUnit": "per cycle" + }, + { + "MetricName": "l3t_retry_lat", + "MetricExpr": "l3t_retry_sum / l3t_retry_alloc", + "MetricGroup": "L3C_LAT", + "BriefDescription": "Average latency of retry requests", + "ScaleUnit": "cycles" + }, + { + "MetricName": "l3t_ret_cpu_bw", + "MetricExpr": "l3t_ret_cpu_sum * 64 / l3c_cycles", + "MetricGroup": "L3C_BW", + "BriefDescription": "Bandwidth of data returned to CPU from L3T (64B)", + "ScaleUnit": "B/s" + }, + { + "MetricName": "l3t_ret_ring_bw", + "MetricExpr": "l3t_ret_ring_sum * 64 / l3c_cycles", + "MetricGroup": "L3C_BW", + "BriefDescription": "Bandwidth of data returned to RING from L3T (64B)", + "ScaleUnit": "B/s" + } +] diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hipxx/sys/uncore-l3c.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hipxx/sys/uncore-l3c.json index 5cdc5a5db533..8c3632b85ee5 100644 --- a/tools/perf/pmu-events/arch/arm64/hisilicon/hipxx/sys/uncore-l3c.json +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hipxx/sys/uncore-l3c.json @@ -27,6 +27,48 @@ "Compat": "0x00000030", "Unit": "hisi_sccl,l3c" }, + { + "EventCode": "0x42", + "EventName": "atomic_tablehsnp_rejecten", + "BriefDescription": "Number of times the hydrasnp in the atomic table is rejected.", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x43", + "EventName": "atomic_tablerejecten", + "BriefDescription": "Number of times internal requests in the atomic table are rejected.", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x44", + "EventName": "atomic_tablealloc", + "BriefDescription": "Number of times the atomic table is allocated.", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x45", + "EventName": "atomic_tablevic", + "BriefDescription": "Number of times the atomic table is replaced.", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x46", + "EventName": "atomic_tabletimeout", + "BriefDescription": "Number of times the atomic table times out.", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x47", + "EventName": "atomic_tablehmerge", + "BriefDescription": "Number of times the atomic table performs hydrasnp merge protocol.", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, { "EventCode": "0x48", "EventName": "l3c_hit", @@ -38,14 +80,14 @@ "EventCode": "0x7f", "EventName": "l3c_cycles", "BriefDescription": "Count of L3C cycles", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", "Unit": "hisi_sccl,l3c" }, { "EventCode": "0x7f", "EventName": "cycles", "BriefDescription": "Count of L3C cycles", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", "Unit": "hisi_sccl,l3c" }, { @@ -53,7 +95,7 @@ "EventName": "cpu_read_l3c_lat", "Filter": "tt_core=0xff", "BriefDescription": "Count the total latency that L3C completes the cluster CPU read requests", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", "Unit": "hisi_sccl,l3c" }, { @@ -61,7 +103,7 @@ "EventName": "l3c_read_hha_lat", "Filter": "tt_core=0xff,tt_req=0x4", "BriefDescription": "Count the total latency that HHA completes the L3C read requests", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", "Unit": "hisi_sccl,l3c" }, { @@ -79,12 +121,30 @@ "Compat": "0x00000030", "Unit": "hisi_sccl,l3c" }, + { + "EventCode": "0xbc", + "EventName": "l3t_ret_cpu_sum", + "BriefDescription": "Count number of the L3T return data to CPU(64B)", + "Filter": "tt_core=0xff", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + + }, + { + "EventCode": "0xbd", + "EventName": "l3t_ret_ring_sum", + "BriefDescription": "Count number of the L3T return data to RING(64B)", + "Filter": "tt_core=0xff", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + + }, { "EventCode": "0xc0", "EventName": "cpu_read_l3c_sum", "Filter": "tt_core=0xff", "BriefDescription": "Count of the requests issued by the cluster CPU read L3C", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", "Unit": "hisi_sccl,l3c" }, { @@ -92,15 +152,298 @@ "EventName": "l3c_read_hha_sum", "Filter": "tt_core=0xff,tt_req=0x4", "BriefDescription": "Count number of L3C read access to HHA", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", "Unit": "hisi_sccl,l3c" }, { "EventCode": "0xce", - "EventName": "l3c_retry_alloc", + "EventName": "l3t_retry_alloc", "Filter": "tt_core=0xff", "BriefDescription": "Count of the L3C retry CPU", - "Compat": "0x00000030", + "Compat": "0x000000(30|40)", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x81", + "EventName": "l3t_dvmop_sum", + "Filter": "tt_req=0x3", + "BriefDescription": "Total time spent by L3T on DVMOp requests", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x84", + "EventName": "l3t_aq_time_sum", + "BriefDescription": "Total time spent by marked requests in AQ buffer", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x85", + "EventName": "l3t_pq_time_sum", + "BriefDescription": "Total time spent by marked requests in PQ buffer", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x86", + "EventName": "l3t_snp_cpu_sum", + "BriefDescription": "Total time spent by L3T on sending SNPs to CPU", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x88", + "EventName": "l3t_rxsnp_l3t_sum", + "BriefDescription": "Total time spent by L3T receiving SNPs from RING", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x8a", + "EventName": "l3t_rxhydrasnp_l3t_sum", + "BriefDescription": "Total time spent by L3T receiving HYDRASNPs from RING", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x8b", + "EventName": "l3t_dbid_l3t_sum", + "BriefDescription": "Total time spent by L3T returning DBIDs to CPU", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x8d", + "EventName": "l3t_wrnotram_sum", + "BriefDescription": "Total time spent by L3T on sending writes to MATA", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x8e", + "EventName": "l3t_retry_sum", + "BriefDescription": "Total time spent by L3T on sending retries to CPU", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xc1", + "EventName": "l3t_dvmop_alloc", + "Filter": "tt_req=0x3", + "BriefDescription": "Number of DVMOp requests received by L3T", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xc4", + "EventName": "l3t_aq_time_alloc", + "BriefDescription": "Total time spent by AQ buffer for marked requests", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xc5", + "EventName": "l3t_pq_time_alloc", + "BriefDescription": "Total time spent by PQ buffer for marked requests", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xc6", + "EventName": "l3t_snp_cpu_alloc", + "BriefDescription": "Number of SNPs sent by L3T to CPU", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xc8", + "EventName": "l3t_rxsnp_l3t_alloc", + "BriefDescription": "Number of SNPs received by L3T from RING", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xca", + "EventName": "l3t_rxhydrasnp_l3t_alloc", + "BriefDescription": "Number of HYDRASNPs received by L3T from RING", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xcb", + "EventName": "l3t_dbid_l3t_alloc", + "BriefDescription": "Number of CPU requests received by L3T", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0xcd", + "EventName": "l3t_wrnotram_alloc", + "BriefDescription": "Number of write requests received by L3T for MATA", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x00", + "EventName": "rd_cpipe", + "BriefDescription": "the number of CPIPEs from CPU send read request", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x01", + "EventName": "rd_hit_cpipe", + "BriefDescription": "the number of CPIPEs from CPU read request hit", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x02", + "EventName": "wr_cpipe", + "BriefDescription": "the number of CPIPEs from CPU send stream write request", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x03", + "EventName": "wr_hit_cpipe", + "BriefDescription": "the number of CPIPEs from CPU stream write request hit", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x04", + "EventName": "io_rd_cpipe", + "Filter": "tt_req=0x4", + "BriefDescription": "the number of IO send read request to CPIPE", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x05", + "EventName": "io_rd_hit_cpipe", + "Filter": "tt_req=0x4", + "BriefDescription": "the number of IO read request hit CPIPE", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x06", + "EventName": "io_wr_cpipe", + "Filter": "tt_req=0x5", + "BriefDescription": "the number of IO send stream write request to CPIPE", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x07", + "EventName": "io_wr_hit_cpipe", + "Filter": "tt_req=0x5", + "BriefDescription": "the number of IO stream write request hit CPIPE", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x0c", + "EventName": "l3_victim", + "BriefDescription": "the number of victim entries in L3", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x0d", + "EventName": "l3d_compress_alloc_solo", + "BriefDescription": "the number of times that data is not compressed when alloc L3D data is compressed", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x0e", + "EventName": "l3d_compress_alloc_twins", + "BriefDescription": "the number of times that data is compressed when alloc L3D data is compressed", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x0f", + "EventName": "l3d_compress_vic_solo", + "BriefDescription": "the number of times that only 64-byte data is compressed during data replacement", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x10", + "EventName": "l3d_compress_vic_twins", + "BriefDescription": "the number of times that only 128-byte data is compressed during data replacement", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x12", + "EventName": "l3d_alloc", + "BriefDescription": "the number of l3d allocs", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x18", + "EventName": "rd_spipe", + "BriefDescription": "the number of SPipe from CPU send read request", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x19", + "EventName": "rd_hit_spipe", + "BriefDescription": "the number of SPipe from CPU read request hit", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x1a", + "EventName": "wr_hit", + "BriefDescription": "the number of SPipe from CPU send stream write request", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x1b", + "EventName": "wr_hit_spipe", + "BriefDescription": "the number of SPipe from CPU stream write request hit", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x1c", + "EventName": "io_rd_spipe", + "Filter": "tt_req=0x4", + "BriefDescription": "the number of IO send read request to SPipe", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x1d", + "EventName": "io_rd_hit_spipe", + "Filter": "tt_req=0x4", + "BriefDescription": "the number of IO read request hit SPipe", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x1e", + "EventName": "io_wr_spipe", + "Filter": "tt_req=0x5", + "BriefDescription": "the number of IO send stream write request to SPipe", + "Compat": "0x00000040", + "Unit": "hisi_sccl,l3c" + }, + { + "EventCode": "0x1f", + "EventName": "io_wr_hit_spipe", + "Filter": "tt_req=0x5", + "BriefDescription": "the number of IO send stream write request hit to SPipe", + "Compat": "0x00000040", "Unit": "hisi_sccl,l3c" } ] -- 2.43.0