Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444646

[PATCH 1/3] perf/core: fixing filename for start/stop filters

From Mathieu Poirier <mathieu.poirier@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 1/3] perf/core: fixing filename for start/stop filters
Date 2016-07-16 00:30 +0200
Message-ID <rVjMn-47e-39@gated-at.bofh.it> (permalink)
References <rVjMm-47e-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] perf/core: miscellaneous fix for address filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-16 00:30 +0200
  [PATCH 1/3] perf/core: fixing filename for start/stop filters Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-16 00:30 +0200
    Re: [PATCH 1/3] perf/core: fixing filename for start/stop filters Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-07-18 13:10 +0200
  [PATCH RFC 2/3] perf/core: update filter only on executable mmap Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-16 00:30 +0200
    Re: [PATCH RFC 2/3] perf/core: update filter only on executable mmap Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-07-18 13:30 +0200
  Re: [PATCH 0/3] perf/core: miscellaneous fix for address filtering Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-07-18 13:40 +0200

csiph-web