[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YD43iUvSodTurUfG@krava>
Date: Tue, 2 Mar 2021 14:03:05 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>,
Andi Kleen <ak@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Ian Rogers <irogers@...gle.com>, Leo Yan <leo.yan@...aro.org>
Subject: Re: [PATCH 04/11] perf test: Fix cpu and thread map leaks in
sw_clock_freq test
On Tue, Mar 02, 2021 at 10:50:15AM +0900, Namhyung Kim wrote:
SNIP
> > > err = -ENOMEM;
> > > pr_debug("Not enough memory to create thread/cpu maps\n");
> > > - goto out_free_maps;
> > > + goto out_delete_evlist;
> > > }
> > >
> > > perf_evlist__set_maps(&evlist->core, cpus, threads);
> > >
> > > - cpus = NULL;
> > > - threads = NULL;
> >
> > hum, so IIUC we added these and the other you remove in your patches long time ago,
> > because there was no refcounting at that time, right?
>
> It seems my original patch just set the maps directly.
>
> bc96b361cbf9 perf tests: Add a test case for checking sw clock event frequency
>
> And after that Adrian changed it to use the set_maps() helper.
>
> c5e6bd2ed3e8 perf tests: Fix software clock events test setting maps
ok, and after that there's this one:
a55e56637613 perf evlist: Reference count the cpu and thread maps at set_maps()
forcing the get calls when storing cpus and threads
for the patchset
Acked-by: Jiri Olsa <jolsa@...hat.com>
thanks,
jirka
>
> It seems we already had the refcounting at the moment. And then the libperf
> renaming happened later.
>
> Thanks,
> Namhyung
>
Powered by blists - more mailing lists