Re: [PATCH v1 0/3] perf list: Remove duplicate PMUs
From: John Garry
Date: Wed Aug 02 2023 - 07:15:44 EST
On 01/08/2023 18:39, Ian Rogers wrote:
I didn't write this behavior, it has pre-existed my contributions. I'm
hoping to change the perf list behavior as we're seeing large server
systems with getting on toward 100 PMUs, the events are replicated for
each one and the perf list and testing behaviors are somewhat
exploding in size.
Sure, that is why I was advised PMU kernel drivers event names to be
unique per PMU, so that we can add an event alias in a JSON and then
kernel events are matched and removed from perf list.
I suppose that your changes are an alternative to the problem of
mushrooming kernel event list.
Thanks John, yep this is going after that problem. Could I get a
reviewed/acked/tested-by for these changes?
I'll try to help.
So we have:
Before:
```
$ perf list
...
uncore_imc_free_running_0/data_read/ [Kernel PMU event]
uncore_imc_free_running_0/data_total/ [Kernel PMU event]
uncore_imc_free_running_0/data_write/ [Kernel PMU event]
uncore_imc_free_running_1/data_read/ [Kernel PMU event]
uncore_imc_free_running_1/data_total/ [Kernel PMU event]
uncore_imc_free_running_1/data_write/ [Kernel PMU event]
```
After:
```
$ perf list
...
uncore_imc_free_running/data_read/ [Kernel PMU event]
uncore_imc_free_running/data_total/ [Kernel PMU event]
uncore_imc_free_running/data_write/ [Kernel PMU event]
```
How about keep listing uncore_imc_free_running_0 and the rest for perf
list -v? Or something like that.
I find that the perf tool has lots of veiled tricks in terms of usage
and describing events available and how to use them.
Thanks,
John