From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932161AbbFDNtg (ORCPT ); Thu, 4 Jun 2015 09:49:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56181 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932131AbbFDNtc (ORCPT ); Thu, 4 Jun 2015 09:49:32 -0400 Date: Thu, 4 Jun 2015 15:49:25 +0200 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , lkml , Peter Zijlstra , Paul Mackerras , David Ahern , Namhyung Kim , Ingo Molnar , Andi Kleen , Stephane Eranian Subject: Re: [PATCHv2 0/9] perf stat: Separate shadow counters code Message-ID: <20150604134924.GA23625@krava.redhat.com> References: <1433341559-31848-1-git-send-email-jolsa@kernel.org> <20150603220705.GF32707@kernel.org> <20150603222453.GG32707@kernel.org> <20150603223824.GA25840@krava.redhat.com> <20150603224200.GH32707@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150603224200.GH32707@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 03, 2015 at 07:42:00PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jun 04, 2015 at 12:38:24AM +0200, Jiri Olsa escreveu: > > 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])) { > > Why not use perf_evsel__name() then? right, I'll repost v3 for first patch in a few jirka