Re: [GIT PULL] perf tools changes for v6.10

From: Linus Torvalds
Date: Sun May 26 2024 - 01:22:38 EST


On Sat, 25 May 2024 at 16:34, Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> So I think we still need to figure out what:
>
> $ perf <command> -e <event> ...
>
> where <event> doesn't specify a PMU means. I'll try to enumerate the options:

[ snip snip ]

How about make the rule be that if the event doesn't have a specified
PMU, then that just means "legacy rules first".

IOW, if you have a fully qualified event name (maybe define that as
"event name contains a slash), then you use the sysfs lookup.

But a simple event name that doesn't contain a slash shall mean "use
legacy lookup rules".

Maybe in practice that ends up being the same as your option #4 ("if
the PMU isn't specified with <event> then we only search core PMUs")?
I don't know the perf code well enough to be able to say.

But basically, the #1 rule in the kernel is that we do not break user
workflows. I happen to think that that is a really important rule, and
I'm disgusted at how many other open source projects ignore that rule
and think that "in the name of improvement, we will break the world".

And as long as "perf" is maintained in the kernel sources, that kernel
rule will guide perf too. Because the rule is not so much "kernels are
special" as a "Linus wants people to be able to feel confident in
updating".

Linus