Re: [RFC PATCH v1] perf parse-events: Make legacy events lower priority than sysfs/json

From: Marc Zyngier
Date: Thu Nov 23 2023 - 11:09:10 EST


On Thu, 23 Nov 2023 15:27:54 +0000,
Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Thu, Nov 23, 2023 at 7:16 AM Marc Zyngier <maz@xxxxxxxxxx> wrote:
> >
> > Again, perf gets shipped in distros, and not necessary as the latest
> > version. Rather, they tend to ship the version matching the kernel. No
> > backport, buggy perf.
>
> Please complain to the distros. I complained to Debian, we got rid of
> the horrible wrapper script thing they did. I complained to two
> separate Ubuntu people over the last two weeks as they still have
> broken packaging even though they derive from Debian. Fedora is of
> course perfect as Arnaldo oversees it :-)

In this instance, I don't need to complain to anyone but you. And
guess what: it is on Fedora that this issue was first discovered.

I also don't see what distro packaging policy has anything to do with
the issue at hand, but that's beside the point.

>
> > And again, I don't see a bug in the PMU driver.
>
> Whether the PMU driver is requested a legacy cycles event or the
> cycles event as an event code, the PMU driver should support it.
> Supporting legacy events is just something core PMU drivers do. This
> workaround wouldn't be necessary were it not for this PMU bug.

Again, *which* PMU bug? What is a legacy event, and when has this
terminology made it into the kernel? Who has decided that a change was
necessary? Why haven't you submitted patches upgrading all the PMU
drivers to support whatever you are referring to?

> This change impacts every user of perf not just a partial fix to
> workaround ARM PMU driver issues, see the updated parse-events test
> for a list of what a simple test sees as a behavior change.

When making far-reaching changes to a subsystem, I apply two rules:

- I address everything that is affected, not just my pet architecture

- I don't break other people's toys, which means compatibility is a
*must*, not a 'nice to have'

By this standard, your complaining that "ARM is broken" doesn't hold.
It was working just fine until your changes rendered perf unusable.

Nonetheless, thank you for addressing it quickly. This is sincerely
appreciated.

M.

--
Without deviation from the norm, progress is not possible.