[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150603223824.GA25840@krava.redhat.com>
Date: Thu, 4 Jun 2015 00:38:24 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
David Ahern <dsahern@...il.com>,
Namhyung Kim <namhyung@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCHv2 0/9] perf stat: Separate shadow counters code
On Wed, Jun 03, 2015 at 07:24:53PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jun 03, 2015 at 07:07:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Jun 03, 2015 at 04:25:50PM +0200, Jiri Olsa escreveu:
> > > hi,
> > > sending cleanup/move of shadow counters. I need it
> > > for my other changes of stat scripting, but I think
> > > it can stand alone as a cleanup.
> > >
> > > v2 changes:
> > > - move evsel id into 'struct perf_stat'
> > > and change the id functions namespace
> >
> > Thanks, applied.
>
> 15: struct perf_event_attr setup :sh: line 1: 27101 Segmentation fault (core dumped) PERF_TEST_ATTR=/tmp/tmptb9pWi /home/acme/bin/perf stat -o /tmp/tmptb9pWi/perf.data kill > /dev/null 2>&1
> sh: line 1: 27104 Segmentation fault (core dumped) PERF_TEST_ATTR=/tmp/tmpWgRK9D /home/acme/bin/perf stat -o /tmp/tmpWgRK9D/perf.data -d kill > /dev/null 2>&1
> sh: line 1: 27107 Segmentation fault (core dumped) PERF_TEST_ATTR=/tmp/tmpmCOyBe /home/acme/bin/perf stat -o /tmp/tmpmCOyBe/perf.data -dd kill > /dev/null 2>&1
> sh: line 1: 27110 Segmentation fault (core dumped) PERF_TEST_ATTR=/tmp/tmpJP9x2e /home/acme/bin/perf stat -o /tmp/tmpJP9x2e/perf.data -ddd kill > /dev/null 2>&1
> Ok
>
> Can you please check?
arghh.. sry, I remember running tests :-\ really ;-)
it's the -d default events that do not set evsel->name
attached patch fixes it, but I'll send v3 for the first patch
thanks,
jirka
---
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index d22791d02db0..dba762da5679 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -88,7 +88,7 @@ void perf_stat_evsel_id_init(struct perf_evsel *evsel)
/* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */
for (i = 0; i < PERF_STAT_EVSEL_ID__MAX; i++) {
- if (!strcmp(evsel->name, id_str[i])) {
+ if (evsel->name && !strcmp(evsel->name, id_str[i])) {
ps->id = i;
break;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists