Re: [PATCH 4/9] perf stat: Move common code in print_metric_headers()

From: Namhyung Kim
Date: Wed Nov 09 2022 - 13:04:40 EST


On Tue, Nov 8, 2022 at 3:19 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Mon, Nov 7, 2022 at 1:33 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> >
> > The struct perf_stat_output_ctx is set in a loop with the same values.
> > Move the code out of the loop and keep the loop minimal.
> >
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
>
> Acked-by: Ian Rogers <irogers@xxxxxxxxxx>
> Could also potentially make it const, but functions it is passed to
> would also need changing.

I'll consider when I work on it later.

Thanks,
Namhyung