在 2024/2/1 0:50, Robin Murphy 写道:
On 31/01/2024 7:08 am, JiaLong.Yang wrote:
This code is based on uncore PMUs arm_smmuv3_pmu and arm-cmn.
One ni-700 can have many clock domains. Each of them has only one PMU.
Here one PMU corresponds to one 'struct ni_pmu' instance.
PMU name will be ni_pmu_N_M, which N means different NI-700s and M means
different PMU in one NI-700. If only one NI-700 found in NI-700, name will
be ni_pmu_N.
Node interface event name will be xxni_N_eventname, such as
asni_0_rdreq_any. There are many kinds of type of nodes in one clock
domain. Also means that there are many kinds of that in one PMU. So we
distinguish them by xxni string. Besides, maybe there are many nodes
have same type. So we have number N in event name.
By ni_pmu_0_0/asni_0_rdreq_any/, we can pinpoint accurate bus traffic.
Example1: perf stat -a -e ni_pmu_0_0/asni_0_rdreq_any/,ni_pmu_0_0/cycles/
EXample2: perf stat -a -e ni_pmu_0_0/asni,id=0,event=0x0/
Oh! I've had a driver for this thing sat around for ages waiting to find someone with an interest in testing it. Given that from a quick skim of this patch I'd also have several concerns with this implementation, may I ask that you have a look at my branch and see if it works for you?
If permission I will test.
https://gitlab.arm.com/linux-arm/linux-rm/-/tree/ni-dev?ref_type=heads
In particular, after the pain of maintaining event aliases in arm-cmn I'd really like to get away from doing that again and instead move over to jevents this time (especially now that system PMU support is a bit more developed there) - I just haven't yet got round to hooking up the identifier and writing the JSON files, since it hasn't seemed like much of a priority before I know whether the code even works.
It's a useful way.
Uncore PMU is increasing. Not only CPU event can be writen in jevents.
I have not considered it when writing code in a low version.
Finally, I have opened a case in arm suppport for linux ni pmu driver.
They tell me no driver.