All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: alexander.shishkin@linux.intel.com
Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] perf/core: fixing filename for start/stop filters
Date: Fri, 15 Jul 2016 16:25:39 -0600	[thread overview]
Message-ID: <1468621541-31024-2-git-send-email-mathieu.poirier@linaro.org> (raw)
In-Reply-To: <1468621541-31024-1-git-send-email-mathieu.poirier@linaro.org>

Binary file names have to be supplied for both range and start/stop
filters but the current code only process the filename if an
address range filter is specified.  This code adds processing of
the filename for start/stop filters.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 kernel/events/core.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 912f10dfbfe5..df21611585d7 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7852,8 +7852,13 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr,
 					goto fail;
 			}
 
-			if (token == IF_SRC_FILE) {
-				filename = match_strdup(&args[2]);
+			if (token == IF_SRC_FILE || token == IF_SRC_FILEADDR) {
+				substring_t *fargs;
+
+				fargs = (token == IF_SRC_FILEADDR ?
+					 &args[1] : &args[2]);
+
+				filename = match_strdup(fargs);
 				if (!filename) {
 					ret = -ENOMEM;
 					goto fail;
-- 
2.7.4

  reply	other threads:[~2016-07-15 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 22:25 [PATCH 0/3] perf/core: miscellaneous fix for address filtering Mathieu Poirier
2016-07-15 22:25 ` Mathieu Poirier [this message]
2016-07-18 11:08   ` [PATCH 1/3] perf/core: fixing filename for start/stop filters Alexander Shishkin
2016-07-15 22:25 ` [PATCH RFC 2/3] perf/core: update filter only on executable mmap Mathieu Poirier
2016-07-18 11:23   ` Alexander Shishkin
2016-07-15 22:25 ` [PATCH 3/3] perf/core: enabling mapping of the stop filters Mathieu Poirier
2016-07-18 11:31   ` Alexander Shishkin
2016-07-18 11:35 ` [PATCH 0/3] perf/core: miscellaneous fix for address filtering Alexander Shishkin

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=1468621541-31024-2-git-send-email-mathieu.poirier@linaro.org \
    --to=mathieu.poirier@linaro.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@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.