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


Groups > linux.kernel > #1445637

[PATCH V2 3/3] perf/core: Enabling mapping of the stop filters

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Mathieu Poirier <mathieu.poirier@linaro.org>
Newsgroups linux.kernel
Subject [PATCH V2 3/3] perf/core: Enabling mapping of the stop filters
Date Mon, 18 Jul 2016 18:50:02 +0200
Message-ID <rWjTY-fe-27@gated-at.bofh.it> (permalink)
References <rWjTY-fe-25@gated-at.bofh.it>
X-Original-To alexander.shishkin@linux.intel.com
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G0KuCK411NXf+ONhCqYVW3u18wWtxLPJVKmVYqCXLus=; b=g/EOZ7dgljy4ffCfb5a4OMG6TvURS/TyIgNUMEYdn8zClZ2UDIbpNXKnElkD4imd3Y Zrkyig0ZKi3IMzFmuaQC9zoyh/sVezpL9d7cNq1Epp1QlKWA3jq1eGJrVdJg5AgR0xKH bCeY5ttzjDyeGfhs47z7sgNTUNDyUQtRZXMwM=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G0KuCK411NXf+ONhCqYVW3u18wWtxLPJVKmVYqCXLus=; b=WKg5X1RrN9jN+WvXDFH5oxApGXre1+yuBeTpFiusk/DhnuvSdkqxsFNM3eYiWRDWdt 4g7EvWuePDt2uNXME33AcVbusaDY9AnoCWmGw/8irk1w1jbukSZCTdYJU5syDm2rGx8w rX3xrsE9gdMS08P4fA1cetwmF5eyKZfg+o0dGfFxrgl1tCYx4cCKLkjqkn2Expmt9Asr nj3sqVIu84HO7p7nrxYm5XeRo3iw3ypWL20+mAi9kZF7hOQbioly9B6hFUGikXpcEVYa lgAvmqDzp7M+KNxJjWcOaQfiKDGGUu5tbyGUDG45mto7Do410z81S08uw1S4gv73V9+a 71SQ==
X-Gm-Message-State ALyK8tJgrIn/sOzzmcrgsOJwtftiNf5nWO9S1w0OhfhCD3WmnahQ/wzW94I1OPkA2Jo3cdKc
X-Received by 10.107.33.66 with SMTP id h63mr5356501ioh.10.1468860238493; Mon, 18 Jul 2016 09:43:58 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-Cc peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, Mathieu Poirier <mathieu.poirier@linaro.org>
X-Original-Date Mon, 18 Jul 2016 10:43:07 -0600
X-Original-Message-ID <1468860187-318-4-git-send-email-mathieu.poirier@linaro.org>
X-Original-References <1468860187-318-1-git-send-email-mathieu.poirier@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1445637

Show key headers only | View raw


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>
---
 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 f2bb2a0fae2b..6768ac4a2fcf 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6493,15 +6493,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,
@@ -7728,7 +7719,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);
 
-- 
2.7.4

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


Thread

[PATCH V2 3/3] perf/core: Enabling mapping of the stop filters Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 18:50 +0200

csiph-web