Re: [PATCH v3] perf evlist: Fix evlist__new_default() for > 1 core PMU
From: Arnaldo Carvalho de Melo
Date: Fri Jan 26 2024 - 11:25:49 EST
Em Wed, Jan 24, 2024 at 09:03:57AM +0000, James Clark escreveu:
> On 24/01/2024 00:46, Namhyung Kim wrote:
> > On Tue, Jan 23, 2024 at 2:39 AM James Clark <james.clark@xxxxxxx> wrote:
> >> +++ b/tools/perf/util/evlist.c
> >> @@ -106,6 +106,13 @@ struct evlist *evlist__new_default(void)
> >> evlist = NULL;
> >> }
> >> + if (evlist->core.nr_entries > 1) {
> > I think you need a NULL check for evlist here.
> Oops yes. Or just return on the error above.
Was there a v4? I'm assuming this is for perf-tools, i.e. for v6.8-rc,
right?
- Arnaldo