From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Dmitry Ilvokhin <d@ilvokhin.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] perf c2c: Fix memory leaks on output fields
Date: Wed, 21 Oct 2026 09:52:40 -0300 [thread overview]
Message-ID: <ati1mDMu5SETwZi1@x2> (raw)
In-Reply-To: <CAP-5=fWCwLuFah70DQCbmmDvjQYJ5DiozBj=YawZK6eVFGNnDw@mail.gmail.com>
On Fri, Oct 16, 2026 at 09:01:12AM -0700, Ian Rogers wrote:
> On Fri, Oct 16, 2026 at 4:21 AM Dmitry Ilvokhin <d@ilvokhin.com> wrote:
> >
> > On Thu, Oct 15, 2026 at 04:32:37PM -0700, Namhyung Kim wrote:
> > > The perf_hpp_list was not freed after use. Let's add it for the main
> > > c2c hists list in perf c2c report and a local list in print_pareto().
> > >
> > > Previously it was detected by ASAN like below.
> > >
> > > =================================================================
> > > ==42183==ERROR: LeakSanitizer: detected memory leaks
> > >
> > > Indirect leak of 1064 byte(s) in 7 object(s) allocated from:
> > > #0 0x7f17334ef24f in calloc (/lib64/libasan.so.8+0xef24f) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079)
> > > #1 0x0000005fa099 in zalloc ../../lib/zalloc.c:8
> > > #2 0x0000004faf6d in get_format tools/perf/builtin-c2c.c:1978
> > > #3 0x0000004fb45e in c2c_hists__init_output tools/perf/builtin-c2c.c:2004
> > > #4 0x0000004fb7de in __hpp_list__parse tools/perf/builtin-c2c.c:2047
> > > #5 0x0000004fbae9 in hpp_list__parse tools/perf/builtin-c2c.c:2085
> > > #6 0x0000004fee13 in print_pareto tools/perf/builtin-c2c.c:2563
> > > #7 0x0000004ffcd7 in perf_c2c__hists_fprintf tools/perf/builtin-c2c.c:2708
> > > #8 0x000000500ab5 in perf_c2c_display tools/perf/builtin-c2c.c:2949
> > > #9 0x0000005045c3 in perf_c2c__report tools/perf/builtin-c2c.c:3522
> > > #10 0x000000505caa in cmd_c2c tools/perf/builtin-c2c.c:3676
> > > #11 0x0000005df50e in run_builtin tools/perf/perf.c:383
> > > #12 0x0000005df9b1 in handle_internal_command tools/perf/perf.c:436
> > > #13 0x0000005dfd7f in run_argv tools/perf/perf.c:480
> > > #14 0x0000005e02d6 in main tools/perf/perf.c:581
> > > #15 0x7f1729450680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c)
> > > #16 0x7f1729450797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c)
> > > #17 0x000000409c34 in _start (tools/perf/perf+0x409c34) (BuildId: 36a64600776d92e4ab7dfd5ca20c92280d72a645)
> > >
> > > SUMMARY: AddressSanitizer: 1064 byte(s) leaked in 7 allocation(s).
> > >
> > > Fixes: c75540e3160f ("perf c2c report: Add dimension support")
> > > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> >
> > Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
Thanks, applied to perf-tools-next, for v7.4.
- Arnaldo
prev parent reply other threads:[~2026-10-21 12:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 23:32 Namhyung Kim
2026-10-16 5:31 ` Aaron Tomlin
2026-10-16 11:20 ` Dmitry Ilvokhin
2026-10-16 16:01 ` Ian Rogers
2026-10-21 12:52 ` Arnaldo Carvalho de Melo [this message]
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=ati1mDMu5SETwZi1@x2 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=d@ilvokhin.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®