Re: [RFC PATCH v2 01/14] perf stat: Introduce core generic print traversal engine and header stubs
From: Arnaldo Carvalho de Melo
Date: Mon May 25 2026 - 20:20:45 EST
On Mon, May 25, 2026 at 04:48:57PM -0700, Ian Rogers wrote:
> On Mon, May 25, 2026 at 4:38 PM Arnaldo Carvalho de Melo
> <acme@xxxxxxxxxx> wrote:
> >
> > On Mon, May 25, 2026 at 04:18:47PM -0700, Ian Rogers wrote:
> > > This patch introduces the initial infrastructure for decoupling the
> > > perf stat printing API. It declares the struct perf_stat_print_callbacks
> > > interface and the core traversal driver perf_stat__print_cb() inside
> > > the newly created util/stat-print.h and util/stat-print.c files.
> >
> > Can we avoid these kinds of reflowings:
> >
> > OPT_UINTEGER(0, "td-level", &stat_config.topdown_level,
> > - "Set the metrics level for the top-down statistics (0: max level)"),
> > - OPT_BOOLEAN(0, "smi-cost", &smi_cost,
> > - "measure SMI cost"),
> > + "Set the metrics level for the top-down statistics (0: max level)"),
> > + OPT_BOOLEAN(0, "smi-cost", &smi_cost, "measure SMI cost")
> >
> > There is a lot to process and these things gets in the way.
> >
> > I'm trying to make sure this doesnt' happen in my patches with or
> > without AI assistance :-)
> >
> > We need to have this as a skill so that AI don't do this.
>
> Actually, it was primarily from running "git clang-format" to clean up
> the #includes, but also for the layout of the AI aided stuff. git
> clang-format likes to think that if you edited a function then tidying
> up any style issues within it is fair game. I can resend with a fix.
If the patch is just about reflowing to standardize on some format, then
we expect that to be what the patch is about, but then it still doesn't
add value at all, its just something we have to look at to see if it
isn't introducing a problem even when obviously it probably will not add
any.
- Arnaldo