Re: [PATCH] perf build: Only enable context analysis with Clang 23 or later

From: Arnaldo Carvalho de Melo

Date: Wed Nov 25 2026 - 12:27:03 EST


On Wed, Nov 25, 2026 at 10:18:20AM +0000, James Clark wrote:
> On 24/11/2026 19:00, Arnaldo Carvalho de Melo wrote:
> > > > The script:
> > > > 3. Copies the kernel header into the tools/ tree, skipping it when only
> > > > the tools/ copy changed (it is ahead) or when it carries intentional
> > > > edits, and stopping for manual investigation when both sides have
> > > > content the other lacks.

> > > > acme@number:~/git/perf-tools-next$

> > > > I.e. the limitation in point number three, about intentional edits, needs to be lifted.
> > > Oh nice I hadn't noticed sync-headers.sh. What's the plan to support tools
> > > side edits? Something like exporting the kernel change as a patch and trying
> > > to apply it on top of the tools copy? Or I suppose you could do it the other
> > > way around and try to apply the tools diff on top of a new clean kernel
> > > copy.

> > I think the script should diff the current state, save that, copy the
> > new header, apply the patch to get the perf tools changes, then ask
> > opencode (or the coding agent used most frequently by the developer) to

> Interesting, didn't think about having an agent invoked from the script.
> Despite what people say about them being unreliable, for things like
> resolving conflicts and digging out commit messages to add context to the
> resolutions, I find them much more reliable than myself. And faster as well.

Well, the script will produce a draft, leave it at that for the
maintainer to decide what to change, if anything, and then do the usual
steps, so it is just automating boring parts. Finding a new maintainer
becomes easier, probably ;-)

> > check if what was done is sensible, then ask the developer to do a last
> > check and amends, sign off and commit.

See?

> > My plan is to have this in tools/perf/scripts/ so that whoever comes
> > after me and Namhyung, if this ends up being needed, don't have to go
> > thru such boring processes that were not automated due to lack of time
> > even being in my mind since forever as tech debt :-\ :-)

> This feels like its turning email into an API that you can attach any front
> end to. I wonder if it would give websites like github any ideas to add a
> "send as a signed linux PR" button :D

Well, e-mail is what we've been using since forever, but having some
button that would essentially do the same via a TUI, GUI, github or
voice interface/whatnot, would end up being equivalent, we still need to
look at what was done by contributors, make sure it was tested
extensively in as many distros and architectures as possible, that
reviewers had enough time to say something if they so think it is in
order do do so, and then send it upstream.

Whatever we can do to make this painless and effective, I'm interested
in.

I did lots of these things manually trying to adhere to what Ingo and
Linus expected from me, there are plenty of examples of me doing so for
these LLMs to have been trained on, now I just want to reap the benefits
and have more time to do interesting things :-)

> It's a great documentation of the actual process which despite all the
> documentation is not always that obvious how to do in practice.

Yeah, that too, that is a very effective, I'd say, way to document what
we've been doing.

- Arnaldo