linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Mathieu Poirier <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, eranian@google.com, torvalds@linux-foundation.org,
	peterz@infradead.org, mingo@kernel.org,
	mathieu.poirier@linaro.org, acme@redhat.com,
	alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, vincent.weaver@maine.edu, jolsa@redhat.com
Subject: [tip:perf/core] perf/core: Enable mapping of the stop filters
Date: Thu, 18 Aug 2016 03:52:08 -0700	[thread overview]
Message-ID: <tip-99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1@git.kernel.org> (raw)
In-Reply-To: <1468860187-318-4-git-send-email-mathieu.poirier@linaro.org>

Commit-ID:  99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1
Gitweb:     http://git.kernel.org/tip/99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1
Author:     Mathieu Poirier <mathieu.poirier@linaro.org>
AuthorDate: Mon, 18 Jul 2016 10:43:07 -0600
Committer:  Ingo Molnar <mingo@kernel.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@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1468860187-318-4-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.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);
 

  reply	other threads:[~2016-08-18 10:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 16:43 [PATCH V2 0/3] perf/core: Miscellaneous fix for address filtering Mathieu Poirier
2016-07-18 16:43 ` [PATCH V2 1/3] perf/core: Fixing filename for start/stop filters Mathieu Poirier
2016-08-18 10:51   ` [tip:perf/core] perf/core: Fix file name handling " tip-bot for Mathieu Poirier
2016-07-18 16:43 ` [PATCH V2 2/3] perf/core: Update filter only on executable mmap Mathieu Poirier
2016-08-18 10:51   ` [tip:perf/core] perf/core: Update filters " tip-bot for Mathieu Poirier
2016-07-18 16:43 ` [PATCH V2 3/3] perf/core: Enabling mapping of the stop filters Mathieu Poirier
2016-08-18 10:52   ` tip-bot for Mathieu Poirier [this message]
2016-07-19  7:30 ` [PATCH V2 0/3] perf/core: Miscellaneous fix for address filtering Alexander Shishkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-99f5bc9bfa9094e7c264a8e09f9507b391a3d1d1@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.weaver@maine.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).