linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jolsa@redhat.com (Jiri Olsa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] perf tools: add infrastructure for PMU specific configuration
Date: Wed, 20 Jul 2016 09:26:20 +0200	[thread overview]
Message-ID: <20160720072620.GA26497@krava> (raw)
In-Reply-To: <1468968836-12695-4-git-send-email-mathieu.poirier@linaro.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, at 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 <mathieu.poirier@linaro.org>
> ---
>  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

  reply	other threads:[~2016-07-20  7:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 22:53 [PATCH 0/6] perf: Driver specific configuration for PMU Mathieu Poirier
2016-07-19 22:53 ` [PATCH 1/6] perf/core: Adding PMU driver specific configuration Mathieu Poirier
2016-07-19 22:53 ` [PATCH 2/6] perf: Passing struct perf_event to function setup_aux() Mathieu Poirier
2016-07-19 22:53 ` [PATCH 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier
2016-07-20  7:26   ` Jiri Olsa [this message]
2016-07-19 22:53 ` [PATCH 4/6] perf tools: pushing driver configuration down to the kernel Mathieu Poirier
2016-07-19 22:53 ` [PATCH 5/6] coresight: adding sink parameter to function coresight_build_path() Mathieu Poirier
2016-07-19 22:53 ` [PATCH 6/6] coresight: etm-perf: incorporating sink definition from cmd line Mathieu Poirier

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=20160720072620.GA26497@krava \
    --to=jolsa@redhat.com \
    --cc=linux-arm-kernel@lists.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;
as well as URLs for NNTP newsgroup(s).