Re: [PATCH 08/19] perf stat: Allocate evsel->stats->aggr properly
From: Namhyung Kim
Date: Tue Oct 11 2022 - 19:39:06 EST
On Mon, Oct 10, 2022 at 4:03 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Sun, Oct 9, 2022 at 10:36 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> >
> > The perf_stat_config.aggr_map should have a correct size of the
> > aggregation map. Use it to allocate aggr_counts.
> >
> > Also AGGR_NONE with per-core events can be tricky because it doesn't
> > aggreate basically but it needs to do so for per-core events only.
>
> nit: s/aggreate/aggregate/
>
> > So only per-core evsels will have stats->aggr data.
> >
> > Note that other caller of evlist__alloc_stat() might not have
> > stat_config or aggr_map.
> >
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
>
> Acked-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> nit: Below there are use of constants true, false and NULL, it would
> be nice to use the /*argument_name=*/... style parameter passing to be
> clearer on what the parameter means.
Sounds good. Will add.
Thanks,
Namhyung