Re: [RFC PATCH v2 01/14] perf stat: Introduce core generic print traversal engine and header stubs

From: Ian Rogers

Date: Mon May 25 2026 - 19:49:20 EST


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.

Thanks,
Ian

> Thanks,
>
> - Arnaldo