HISI-PMU1

翻译自 https://gitee.com/openeuler/kernel/blob/openEuler-22.09/Documentation/admin-guide/perf/hisi-pmu.rst
适用于鲲鹏 920 系列片上系统芯片

海思 片上系统(SoC) 非核心(uncore) 性能监测单元(PMU)

海思片上系统 SoC芯片包括各种独立的系统设备PMU

例如L3缓存(L3C)、Hydra Home Agent(HHA)和DDRC。这些PMU是独立的,具有硬件逻辑收集统计数据和性能的信息。

HiSilicon SoC封装了多个CPU和IO芯片。每个CPU群集(CCL)由共享一个L3缓存的4个cpu内核组成;每个CPU die 被称为超级CPU集群(SCCL),由6个CCL组成。每个SCCL都有两个HHA(0-1)和四个DDRC(0-3)。

海思 片上系统(SoC) 非核心(uncore) 性能监测单元(PMU) 驱动程序

每个设备PMU都有单独的寄存器,用于事件计数(counting)、控制(control) 和 中断(interrupt),PMU驱动程序应注册执行PMU驱动,如L3C,HHA和DDRC等。可用事件和配置选项应请参见 sysfs:

/sys/devices/hisi_sccl{X}_<l3c{Y}/hha{Y}/ddrc{Y{>/,

/sys/bus/event_source/devices/hisi_sccl{X}_<l3c{Y}/hha{Y}/ddrc{Y{>。

“perf list”命令应列出sysfs中的可用事件。

每个L3C、HHA和DDRC都注册为单独的具有perf支持的PMU。PMU名称将在事件列表中显示为hisi_sccl_module

其中“sccl-id”是sccl的标识符,“index-id”是模块(module)的索引。

e.g. hisi_sccl3_l3c0/rd_hit_cpipe is READ_HIT_CPIPE event of L3C index #0 in SCCL ID #3.

e.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in SCCL ID #1.

驱动程序还提供了一个“cpumask”sysfs属性,它显示CPU核心ID用于统计非核心PMU事件。

perf:的用法示例:

$# perf list
hisi_sccl3_l3c0/rd_hit_cpipe/ [kernel PMU event]
------------------------------------------
hisi_sccl3_l3c0/wr_hit_cpipe/ [kernel PMU event]
------------------------------------------
hisi_sccl1_l3c0/rd_hit_cpipe/ [kernel PMU event]
------------------------------------------
hisi_sccl1_l3c0/wr_hit_cpipe/ [kernel PMU event]
------------------------------------------

$# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5
$# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5

当前驱动程序不支持采样(sampling)。因此不支持“perf record”。

也不支持附加(attach)到任务(task),因为事件都是非核心(uncore)的。

注意:请联系维护人员以获取SoC中的PMU设备支持的事件的完整列表,及其信息(如果需要)。

posted @ 2022-09-18 18:15  opsiff  阅读(104)  评论(0编辑  收藏  举报