From: jolsa@redhat.com (Jiri Olsa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 4/6] perf tools: pushing driver configuration down to the kernel
Date: Thu, 21 Jul 2016 09:47:38 +0200 [thread overview]
Message-ID: <20160721074738.GD7192@krava> (raw)
In-Reply-To: <1469047100-18131-5-git-send-email-mathieu.poirier@linaro.org>
On Wed, Jul 20, 2016 at 02:38:18PM -0600, Mathieu Poirier wrote:
> Now that PMU specific driver configuration are queued in
> evsel::drv_config_terms, all we need to do is re-use the current
> ioctl() mechanism to push down the information to the kernel
> driver.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
> tools/perf/builtin-record.c | 9 +++++++++
> tools/perf/util/evlist.c | 24 ++++++++++++++++++++++++
> tools/perf/util/evlist.h | 3 +++
> tools/perf/util/evsel.c | 32 ++++++++++++++++++++++++++++++++
> tools/perf/util/evsel.h | 3 +++
> 5 files changed, 71 insertions(+)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 8f2c16d9275f..dffea1033b8e 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -383,6 +383,7 @@ static int record__open(struct record *rec)
> struct perf_evlist *evlist = rec->evlist;
> struct perf_session *session = rec->session;
> struct record_opts *opts = &rec->opts;
> + struct perf_evsel_config_term *err_term;
> int rc = 0;
>
> perf_evlist__config(evlist, opts, &callchain_param);
> @@ -412,6 +413,14 @@ try_again:
> goto out;
> }
>
> + if (perf_evlist__apply_drv_configs(evlist, &pos, &err_term)) {
> + error("failed to set config \"%s\" on event %s with %d (%s)\n",
> + err_term->val.drv_cfg, perf_evsel__name(pos), errno,
> + strerror_r(errno, msg, sizeof(msg)));
> + rc = -1;
> + goto out;
> + }
> +
how about 'perf top' and 'perf stat', should they support this too?
thanks,
jirka
WARNING: multiple messages have this Message-ID (diff)
From: Jiri Olsa <jolsa@redhat.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V2 4/6] perf tools: pushing driver configuration down to the kernel
Date: Thu, 21 Jul 2016 09:47:38 +0200 [thread overview]
Message-ID: <20160721074738.GD7192@krava> (raw)
In-Reply-To: <1469047100-18131-5-git-send-email-mathieu.poirier@linaro.org>
On Wed, Jul 20, 2016 at 02:38:18PM -0600, Mathieu Poirier wrote:
> Now that PMU specific driver configuration are queued in
> evsel::drv_config_terms, all we need to do is re-use the current
> ioctl() mechanism to push down the information to the kernel
> driver.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
> tools/perf/builtin-record.c | 9 +++++++++
> tools/perf/util/evlist.c | 24 ++++++++++++++++++++++++
> tools/perf/util/evlist.h | 3 +++
> tools/perf/util/evsel.c | 32 ++++++++++++++++++++++++++++++++
> tools/perf/util/evsel.h | 3 +++
> 5 files changed, 71 insertions(+)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 8f2c16d9275f..dffea1033b8e 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -383,6 +383,7 @@ static int record__open(struct record *rec)
> struct perf_evlist *evlist = rec->evlist;
> struct perf_session *session = rec->session;
> struct record_opts *opts = &rec->opts;
> + struct perf_evsel_config_term *err_term;
> int rc = 0;
>
> perf_evlist__config(evlist, opts, &callchain_param);
> @@ -412,6 +413,14 @@ try_again:
> goto out;
> }
>
> + if (perf_evlist__apply_drv_configs(evlist, &pos, &err_term)) {
> + error("failed to set config \"%s\" on event %s with %d (%s)\n",
> + err_term->val.drv_cfg, perf_evsel__name(pos), errno,
> + strerror_r(errno, msg, sizeof(msg)));
> + rc = -1;
> + goto out;
> + }
> +
how about 'perf top' and 'perf stat', should they support this too?
thanks,
jirka
next prev parent reply other threads:[~2016-07-21 7:47 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 20:38 [PATCH V2 0/6] perf: Driver specific configuration for PMU Mathieu Poirier
2016-07-20 20:38 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 1/6] perf/core: Adding PMU driver specific configuration Mathieu Poirier
2016-07-20 20:38 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 2/6] perf: Passing struct perf_event to function setup_aux() Mathieu Poirier
2016-07-20 20:38 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier
2016-07-20 20:38 ` Mathieu Poirier
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 14:44 ` Mathieu Poirier
2016-07-21 14:44 ` Mathieu Poirier
2016-07-21 14:54 ` Jiri Olsa
2016-07-21 14:54 ` Jiri Olsa
2016-07-21 15:47 ` Mathieu Poirier
2016-07-21 15:47 ` Mathieu Poirier
2016-07-22 18:24 ` Mathieu Poirier
2016-07-22 18:24 ` Mathieu Poirier
2016-07-26 20:41 ` Jiri Olsa
2016-07-26 20:41 ` Jiri Olsa
2016-07-27 17:59 ` Mathieu Poirier
2016-07-27 17:59 ` Mathieu Poirier
2016-07-27 19:26 ` Jiri Olsa
2016-07-27 19:26 ` Jiri Olsa
2016-07-28 16:15 ` Mathieu Poirier
2016-07-28 16:15 ` Mathieu Poirier
2016-07-28 16:52 ` Jiri Olsa
2016-07-28 16:52 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-20 20:38 ` [PATCH V2 4/6] perf tools: pushing driver configuration down to the kernel Mathieu Poirier
2016-07-20 20:38 ` Mathieu Poirier
2016-07-21 7:47 ` Jiri Olsa [this message]
2016-07-21 7:47 ` Jiri Olsa
2016-07-22 19:57 ` Mathieu Poirier
2016-07-22 19:57 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 5/6] coresight: adding sink parameter to function coresight_build_path() Mathieu Poirier
2016-07-20 20:38 ` Mathieu Poirier
2016-07-21 10:49 ` Suzuki K Poulose
2016-07-21 10:49 ` Suzuki K Poulose
2016-07-21 15:05 ` Mathieu Poirier
2016-07-21 15:05 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 6/6] coresight: etm-perf: incorporating sink definition from cmd line Mathieu Poirier
2016-07-20 20:38 ` 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=20160721074738.GD7192@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.