From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH 3/4] perf tools: Add perf_evsel__read_counter function
Date: Tue, 25 Jul 2017 22:42:58 -0300 [thread overview]
Message-ID: <20170726014258.GE23846@kernel.org> (raw)
In-Reply-To: <20170726014148.GD23846@kernel.org>
Em Tue, Jul 25, 2017 at 10:41:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jul 21, 2017 at 02:12:11PM +0200, Jiri Olsa escreveu:
> > +++ b/tools/perf/util/stat.c
> > @@ -128,6 +128,9 @@ static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
> > static void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
> > {
> > + struct perf_stat_evsel *ps = evsel->priv;
> > +
> > + free(ps->group_data);
> Humm, are you sure you can always do that, i.e. that evsel->priv is not
> NULL?
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000054ca04 in perf_evsel__free_stat_priv (evsel=0x2454be0) at util/stat.c:133
> 133 free(ps->group_data);
> Missing separate debuginfos, use: dnf debuginfo-install audit-libs-2.7.7-1.fc25.x86_64 elfutils-libelf-0.169-1.fc25.x86_64 elfutils-libs-0.169-1.fc25.x86_64 libunwind-1.2-1.fc25.x86_64 perl-libs-5.24.1-386.fc25.x86_64 python-libs-2.7.13-2.fc25.x86_64 slang-2.3.0-7.fc25.x86_64
> (gdb) bt
> #0 0x000000000054ca04 in perf_evsel__free_stat_priv (evsel=0x2454be0) at util/stat.c:133
> #1 0x000000000054cc93 in perf_evlist__free_stats (evlist=0x24541a0) at util/stat.c:189
> #2 0x0000000000460311 in cmd_script (argc=0, argv=0x7fffffffe170) at builtin-script.c:3075
> #3 0x00000000004be56c in run_builtin (p=0xa359f8 <commands+408>, argc=1, argv=0x7fffffffe170) at perf.c:296
> #4 0x00000000004be7d9 in handle_internal_command (argc=1, argv=0x7fffffffe170) at perf.c:348
> #5 0x00000000004be92b in run_argv (argcp=0x7fffffffdfcc, argv=0x7fffffffdfc0) at perf.c:392
> #6 0x00000000004bed05 in main (argc=1, argv=0x7fffffffe170) at perf.c:530
> (gdb)
>
> I'm dropping the series, please retest with 'perf script'.
I'll keep the first one, kinda unrelated :-)
> - Arnaldo
next prev parent reply other threads:[~2017-07-26 1:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 12:12 [PATCH 0/4] perf stat: Enable group read of counters Jiri Olsa
2017-07-21 12:12 ` [PATCH 1/4] perf tools: Add verbose output for sys_perf_event_open fallback Jiri Olsa
2017-07-26 17:23 ` [tip:perf/core] perf evsel: " tip-bot for Jiri Olsa
2017-07-21 12:12 ` [PATCH 2/4] perf tools: Add perf_evsel__read_size function Jiri Olsa
2017-07-21 12:12 ` [PATCH 3/4] perf tools: Add perf_evsel__read_counter function Jiri Olsa
2017-07-26 1:41 ` Arnaldo Carvalho de Melo
2017-07-26 1:42 ` Arnaldo Carvalho de Melo [this message]
2017-07-26 7:30 ` Jiri Olsa
2017-07-21 12:12 ` [PATCH 4/4] perf stat: Use group read for event groups Jiri Olsa
2017-07-23 0:53 ` Namhyung Kim
2017-07-24 7:31 ` Jiri Olsa
2017-07-21 17:07 ` [PATCH 0/4] perf stat: Enable group read of counters 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=20170726014258.GE23846@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=alexander.shishkin@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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;
as well as URLs for NNTP newsgroup(s).