[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1@git.kernel.org>
Date: Thu, 18 Aug 2016 03:52:08 -0700
From: tip-bot for Mathieu Poirier <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, eranian@...gle.com, torvalds@...ux-foundation.org,
peterz@...radead.org, mingo@...nel.org, mathieu.poirier@...aro.org,
acme@...hat.com, alexander.shishkin@...ux.intel.com,
linux-kernel@...r.kernel.org, tglx@...utronix.de,
vincent.weaver@...ne.edu, jolsa@...hat.com
Subject: [tip:perf/core] perf/core: Enable mapping of the stop filters
Commit-ID: 99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1
Gitweb: http://git.kernel.org/tip/99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1
Author: Mathieu Poirier <mathieu.poirier@...aro.org>
AuthorDate: Mon, 18 Jul 2016 10:43:07 -0600
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 18 Aug 2016 10:35:51 +0200
perf/core: Enable mapping of the stop filters
At this time the perf_addr_filter_needs_mmap() function will _not_
return true on a user space 'stop' filter. But stop filters need
exactly the same kind of mapping that range and start filters get.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Link: http://lkml.kernel.org/r/1468860187-318-4-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/events/core.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 9a030a9..a5fc5c8 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6620,15 +6620,6 @@ got_name:
}
/*
- * Whether this @filter depends on a dynamic object which is not loaded
- * yet or its load addresses are not known.
- */
-static bool perf_addr_filter_needs_mmap(struct perf_addr_filter *filter)
-{
- return filter->filter && filter->inode;
-}
-
-/*
* Check whether inode and address range match filter criteria.
*/
static bool perf_addr_filter_match(struct perf_addr_filter *filter,
@@ -7848,7 +7839,11 @@ static void perf_event_addr_filters_apply(struct perf_event *event)
list_for_each_entry(filter, &ifh->list, entry) {
event->addr_filters_offs[count] = 0;
- if (perf_addr_filter_needs_mmap(filter))
+ /*
+ * Adjust base offset if the filter is associated to a binary
+ * that needs to be mapped:
+ */
+ if (filter->inode)
event->addr_filters_offs[count] =
perf_addr_filter_apply(filter, mm);
Powered by blists - more mailing lists