lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@redhat.com>

thanks,
jirka

>
> It seems we already had the refcounting at the moment. And then the libperf
> renaming happened later.
>
> Thanks,
> Namhyung
>

\
 
 \ /
  Last update: 2021-03-02 17:10    [W:0.044 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site