From: Qi Liu liuqi115@huawei.com
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I63VF5
--------------------------------------------------------------------------
Add support for HiSilicon SLLC PMU aliasing on Hip09 platform.
Signed-off-by: Qi Liu liuqi115@huawei.com Signed-off-by: Junhao He hejunhao3@huawei.com --- .../hisilicon/hip09/sys/uncore-sllc.json | 134 ++++++++++++++++++ tools/perf/pmu-events/jevents.c | 1 + 2 files changed, 135 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-sllc.json
diff --git a/tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-sllc.json b/tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-sllc.json new file mode 100644 index 000000000000..3f62cb0c791d --- /dev/null +++ b/tools/perf/pmu-events/arch/arm64/hisilicon/hip09/sys/uncore-sllc.json @@ -0,0 +1,134 @@ +[ + { + "EventCode": "0x09", + "EventName": "sllc_cycles", + "BriefDescription": "Count of SLLC cycles", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventName": "cycles", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x20", + "EventName": "rx_req_sum", + "BriefDescription": "total cycles SLLC taken to receive requests", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x21", + "EventName": "rx_data_sum", + "BriefDescription": "total cycles SLLC taken to receive data", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x24", + "EventName": "tx_req_sum", + "BriefDescription": "total cycles SLLC taken to transmit requests", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x25", + "EventName": "tx_data_sum", + "BriefDescription": "total cycles SLLC taken to transmit data", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x30", + "EventName": "rx_req", + "BriefDescription": "Count of the requests received by SLLC", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x31", + "EventName": "rx_data", + "BriefDescription": "Count of the data received by SLLC", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x34", + "EventName": "tx_req", + "BriefDescription": "Count of the requests transmitted by SLLC", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "EventCode": "0x35", + "EventName": "tx_data", + "BriefDescription": "Count of the data transmitted by SLLC", + "Compat": "0x00000030", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "rx_req_sum / rx_req", + "BriefDescription": "Average latency of SLLC receive requests(cycles)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_rx_req_lat", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "rx_data_sum / rx_data", + "BriefDescription": "Average latency of SLLC receive data(cycles)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_rx_data_lat", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "tx_req_sum / tx_req", + "BriefDescription": "Average latency of SLLC transmit requests(cycles)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_tx_req_lat", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "tx_data_sum / tx_data", + "BriefDescription": "Average latency of SLLC transmit data(cycles)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_tx_data_lat", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "rx_req * 332 / duration_time", + "BriefDescription": "Average bandwidth of SLLC receive requests(bits/s)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_rx_req_bw", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "rx_data * 332 / duration_time", + "BriefDescription": "Average bandwidth of SLLC receive data(bits/s)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_rx_data_bw", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "tx_req * 332 / duration_time", + "BriefDescription": "Average bandwidth of SLLC transmit requests(bits/s)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_tx_req_bw", + "Unit": "hisi_sccl,sllc" + }, + { + "MetricExpr": "tx_data * 332 / duration_time", + "BriefDescription": "Average bandwidth of SLLC transmit data(bits/s)", + "Compat": "0x00000030", + "MetricGroup": "SLLC", + "MetricName": "sllc_tx_data_bw", + "Unit": "hisi_sccl,sllc" + } +] \ No newline at end of file diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index a2cad84563a0..c1c3cf4382a6 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -281,6 +281,7 @@ static struct map { { "hisi_sccl,ddrc", "hisi_sccl,ddrc" }, { "hisi_sccl,hha", "hisi_sccl,hha" }, { "hisi_sccl,l3c", "hisi_sccl,l3c" }, + { "hisi_sccl,sllc", "hisi_sccl,sllc" }, { "L3PMC", "amd_l3" }, { "DFPMC", "amd_df" }, {}