All of lore.kernel.org
 help / color / mirror / Atom feed
From: Riccardo Mancini <rickyman7@gmail.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Kan Liang <kan.liang@linux.intel.com>,
	Ian Rogers <irogers@google.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 02/20] perf env: fix sibling_dies memory leak
Date: Fri, 16 Jul 2021 15:13:37 +0200	[thread overview]
Message-ID: <b8ec4f29889914e49fac73af59466e8acdf1e49f.camel@gmail.com> (raw)
In-Reply-To: <YPCRR8jv47kHG/xC@kernel.org>

Hi Arnaldo,

thanks for reviewing this patchset and, more importantly, for manually adding
all Fixes: tags. I'm so sorry for that.

On Thu, 2021-07-15 at 16:49 -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jul 15, 2021 at 06:07:07PM +0200, Riccardo Mancini escreveu:
> > ASan reports a memory leak in perf_env while running the perf test
> > "41: Session topology", caused by sibling_dies not being freed.
> > 
> > This patch adds the required free.
>  
> > Fixes: acae8b36cded0ee6 ("perf header: Add die information in CPU topology")
> 
> So, I CC the author of the patch and its committer, using this shell
> script:
> 
>   $ cat ~/bin/fixes
>   #!/bin/bash
>   
>   cset=$1
>   if [ $# -eq 0 ] ; then
>         read cset
>   fi
>   git show --pretty=fuller $cset | grep '^\(Author\|Commit\): ' | sed -r
> 's/.*: +/Cc: /g' | grep -v "Arnaldo Carvalho de Melo" | sort -u
>   echo Fixes: `git one $cset`
>   $
>   $ grep one -B1 ~/.gitconfig
>   [alias]
>         one = show -s --pretty='format:%h (\"%s\")'
>   $
>   $ fixes acae8b36cded0ee6
>   Cc: Kan Liang <kan.liang@linux.intel.com>
>   Fixes: acae8b36cded0ee6 ("perf header: Add die information in CPU topology")
>   $
> 
> Normally I copy the cset SHA and, in vim, select it and run !fixes, i.e.
> 
> :'<,'>!fixes

Thanks! I've added this nice script to my PATH. :)

Thanks,
Riccardo

> 
> Thanks, applied.
> 
> - Arnaldo
> 
> > Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
> > ---
> >  tools/perf/util/env.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
> > index ebc5e9ad35db21d1..6c765946ef6f591c 100644
> > --- a/tools/perf/util/env.c
> > +++ b/tools/perf/util/env.c
> > @@ -186,6 +186,7 @@ void perf_env__exit(struct perf_env *env)
> >         zfree(&env->cpuid);
> >         zfree(&env->cmdline);
> >         zfree(&env->cmdline_argv);
> > +       zfree(&env->sibling_dies);
> >         zfree(&env->sibling_cores);
> >         zfree(&env->sibling_threads);
> >         zfree(&env->pmu_mappings);
> > -- 
> > 2.31.1
> > 
> 



  reply	other threads:[~2021-07-16 13:13 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 16:07 [PATCH 00/20] perf: fix several memory leaks reported by ASan on perf-test Riccardo Mancini
2021-07-15 16:07 ` [PATCH 01/20] perf nsinfo: fix refcounting Riccardo Mancini
2021-07-15 19:02   ` Arnaldo Carvalho de Melo
2021-07-15 19:07     ` Arnaldo Carvalho de Melo
2021-07-15 19:20     ` Arnaldo Carvalho de Melo
2022-01-05  6:19       ` Krister Johansen
2022-01-06 20:27         ` Arnaldo Carvalho de Melo
2022-01-06 20:34           ` Arnaldo Carvalho de Melo
2021-07-15 19:44     ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 02/20] perf env: fix sibling_dies memory leak Riccardo Mancini
2021-07-15 19:49   ` Arnaldo Carvalho de Melo
2021-07-16 13:13     ` Riccardo Mancini [this message]
2021-07-15 16:07 ` [PATCH 03/20] perf test: session_topology: delete session->evlist Riccardo Mancini
2021-07-15 19:51   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 04/20] perf test: event_update: fix memory leak of evlist Riccardo Mancini
2021-07-15 19:54   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 05/20] perf test: event_update: fix memory leak of unit Riccardo Mancini
2021-07-15 19:58   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 06/20] perf dso: fix memory leak in dso__new_map Riccardo Mancini
2021-07-15 20:01   ` Arnaldo Carvalho de Melo
2021-07-15 20:07   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 07/20] perf test: maps__merge_in: fix memory leak of maps Riccardo Mancini
2021-07-15 20:10   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 08/20] perf env: fix memory leak of cpu_pmu_caps Riccardo Mancini
2021-07-15 20:12   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 09/20] perf report: free generated help strings for sort option Riccardo Mancini
2021-07-15 20:15   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 10/20] perf inject: close inject.output Riccardo Mancini
2021-07-15 20:17   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 11/20] perf session: cleanup trace_event Riccardo Mancini
2021-07-15 20:21   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 12/20] perf script: release zstd data Riccardo Mancini
2021-07-15 20:23   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 13/20] perf script: fix memory leaks in perf_script Riccardo Mancini
2021-07-15 20:25   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 14/20] perf util/lzma: close lzma stream Riccardo Mancini
2021-07-15 20:31   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 15/20] perf trace: free malloc'd trace fields on exit Riccardo Mancini
2021-07-15 20:32   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 16/20] perf trace: free syscall->arg_fmt Riccardo Mancini
2021-07-15 20:35   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 17/20] perf trace: free syscall tp fields in evsel->priv Riccardo Mancini
2021-07-15 20:35   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 18/20] perf trace: free strings in trace__parse_events_option Riccardo Mancini
2021-07-15 20:36   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 19/20] perf test: bpf: free obj_buf Riccardo Mancini
2021-07-15 20:39   ` Arnaldo Carvalho de Melo
2021-07-16 16:50   ` Arnaldo Carvalho de Melo
2021-07-15 16:07 ` [PATCH 20/20] perf util/probe-file: delete namelist on error in del_events Riccardo Mancini
2021-07-15 20:41   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b8ec4f29889914e49fac73af59466e8acdf1e49f.camel@gmail.com \
    --to=rickyman7@gmail.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.