diff mbox

[V3,3/3] perf/core: Enabling mapping of the stop filters

Message ID 1470944843-7575-4-git-send-email-mathieu.poirier@linaro.org
State Accepted
Commit 99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1
Headers show

Commit Message

Mathieu Poirier Aug. 11, 2016, 7:47 p.m. UTC
At this time function perf_addr_filter_needs_mmap() will _not_
return true on a user space 'stop' filter.  But stop filters
needs exactly the same kind of mapping that range and start
filters get.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

---
 kernel/events/core.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

-- 
2.7.4
diff mbox

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 463235ffc39c..b5022836649a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6553,15 +6553,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,
@@ -7781,7 +7772,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);