diff mbox

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

Message ID 1468621541-31024-2-git-send-email-mathieu.poirier@linaro.org
State New
Headers show

Commit Message

Mathieu Poirier July 15, 2016, 10:25 p.m. UTC
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(-)

-- 
2.7.4
diff mbox

Patch

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;