From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbcGTH00 (ORCPT ); Wed, 20 Jul 2016 03:26:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44687 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbcGTH0Z (ORCPT ); Wed, 20 Jul 2016 03:26:25 -0400 Date: Wed, 20 Jul 2016 09:26:20 +0200 From: Jiri Olsa To: Mathieu Poirier Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/6] perf tools: add infrastructure for PMU specific configuration Message-ID: <20160720072620.GA26497@krava> References: <1468968836-12695-1-git-send-email-mathieu.poirier@linaro.org> <1468968836-12695-4-git-send-email-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1468968836-12695-4-git-send-email-mathieu.poirier@linaro.org> User-Agent: Mutt/1.6.2 (2016-07-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 20 Jul 2016 07:26:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 19, 2016 at 04:53:53PM -0600, Mathieu Poirier wrote: > This patchset adds PMU driver specific configuration to the parser > infrastructure by preceding any term with the '@' letter. As such > doing something like: > > perf record -e some_event/@cfg1,@cfg2=config/ ... > > will see 'cfg1' and 'cfg2=config' being added to the list of evsel config > terms. Token 'cfg1' and 'cfg2=config' are not processed in user space > and are meant to be interpreted by the PMU driver. > > First the lexer/parser are supplemented with the required definitions to > recognise the driver specific configuration. From there they are simply > added to the list of event terms. The bulk of the work is done in > function "parse_events_add_pmu()" where driver config event terms are > added to a new list of driver config terms, which in turn spliced with > the event's new driver configuration list. > > Signed-off-by: Mathieu Poirier > --- > tools/perf/util/evsel.c | 1 + > tools/perf/util/evsel.h | 4 +++ > tools/perf/util/parse-events.c | 67 +++++++++++++++++++++++++++++++----------- > tools/perf/util/parse-events.h | 1 + > tools/perf/util/parse-events.l | 12 ++++++++ > tools/perf/util/parse-events.y | 11 +++++++ > 6 files changed, 79 insertions(+), 17 deletions(-) > > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > index 5d7037ef7d3b..7f97bae594ff 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -213,6 +213,7 @@ void perf_evsel__init(struct perf_evsel *evsel, > evsel->bpf_fd = -1; > INIT_LIST_HEAD(&evsel->node); > INIT_LIST_HEAD(&evsel->config_terms); > + INIT_LIST_HEAD(&evsel->drv_config_terms); > perf_evsel__object.init(evsel); > evsel->sample_size = __perf_evsel__sample_size(attr->sample_type); > perf_evsel__calc_id_pos(evsel); > diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h > index c1f10159804c..0441be00a366 100644 > --- a/tools/perf/util/evsel.h > +++ b/tools/perf/util/evsel.h > @@ -44,6 +44,7 @@ enum { > PERF_EVSEL__CONFIG_TERM_CALLGRAPH, > PERF_EVSEL__CONFIG_TERM_STACK_USER, > PERF_EVSEL__CONFIG_TERM_INHERIT, > + PERF_EVSEL__CONFIG_TERM_DRV_CFG, > PERF_EVSEL__CONFIG_TERM_MAX, Arnaldo just merged changes that adds new terms, so this patch won't apply.. could you please rebase to [1] and resend? We don't change it too often, you just hit the window ;-) thanks, jirka [1] git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core