[PATCH v2 3/8] drivers/perf: hisi: Add new functions for L3C PMU

Shaokun Zhang zhangshaokun at hisilicon.com
Thu Feb 4 01:30:49 EST 2021


Hi Mark,

在 2021/2/3 21:10, Mark Rutland 写道:
> On Wed, Feb 03, 2021 at 03:51:03PM +0800, Shaokun Zhang wrote:
>> On HiSilicon Hip09 platform, some new functions are enhanced on L3C PMU,
>> like, tracetag feature that L3C PMU can only count the specified
>> operations by the user, or L3C PMU can give the desired core's statistics
>> in the cluster.
>> $# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_core=0xf/ sleep 5
>>
>> $# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_req=0x4/ sleep 5
> 
> Are these values documented somewhere?
> 

Yes, all filter choices have been listed in the hisi-pmu document in
patch8.

> [...]
> 
>> +HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_core, config1, 7, 0);
>> +HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_req, config1, 10, 8);
>> +HISI_PMU_EVENT_ATTR_EXTRACTOR(datasrc_cfg, config1, 15, 11);
>> +HISI_PMU_EVENT_ATTR_EXTRACTOR(datasrc_skt, config1, 16, 16);
> 
> Could you please mention all of these in the commit message?

Ok,

> 
> IIUC tt_core is a mask of physical cores in the cluster, and I guess

Correct,

> tt_req is a request type, but I have no idea what the datasrc_cfg or

Yes, including read, write and atomic operation.

> datasrc_skt (socket?) fields represent.

Data source (datasrc) is used to allow the user to check where the data
comes from, for instance:
perf stat -a -e hisi_sccl3_l3c0/dat_access,datasrc_cfg=0xE/ xxx command.
it will show the dat_access event that comes from the local DDR.
The code meaning is listed in hisi-pmu document later in patch8.
......
5'b01110: comes from the local DDR;
5'b01111: comes from the cross-die DDR;
......

If datasrc is used in the multi-chips and check the data source is another
socket, datasrc_skt shall be configured in perf command, like:
5'b01001: comes from L3C which is in another socket;
5'b10000: comes from cross-socket DDR;

> 
> A rough description would be very helpful, something like:
> 
> | We expose the tracetag filters with new fields exposed to userspace:
> |
> | * tt_core is a mask of cores within the PMU's cluster
> | * tt_req is ???
> | * datasrc_cfg is ???
> | * datasrc_skt is ???

Sure, I will add these descriptions in the log.

Thanks,
Shaokun

> 
> Thanks,
> Mark.
> .
> 



More information about the linux-arm-kernel mailing list