From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] perf/core: enabling mapping of the stop filters
Date: Mon, 18 Jul 2016 14:31:05 +0300 [thread overview]
Message-ID: <871t2rp4hy.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <1468621541-31024-4-git-send-email-mathieu.poirier@linaro.org>
Mathieu Poirier <mathieu.poirier@linaro.org> writes:
> 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.
Indeed.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
> kernel/events/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index b9aa8f0ff070..b0bf00c728c2 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6498,7 +6498,7 @@ got_name:
> */
> static bool perf_addr_filter_needs_mmap(struct perf_addr_filter *filter)
> {
> - return filter->filter && filter->inode;
> + return filter->inode;
> }
Maybe kill the function altogether and instead:
diff --git a/kernel/events/core.c b/kernel/events/core.c
index a001be5d4b..bc8e1ad170 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7905,7 +7905,8 @@ 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))
+ /* file-based filter */
+ if (filter->inode)
event->addr_filters_offs[count] =
perf_addr_filter_apply(filter, mm);
Thanks,
--
Alex
next prev parent reply other threads:[~2016-07-18 11:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 22:25 [PATCH 0/3] perf/core: miscellaneous fix for address filtering Mathieu Poirier
2016-07-15 22:25 ` [PATCH 1/3] perf/core: fixing filename for start/stop filters Mathieu Poirier
2016-07-18 11:08 ` Alexander Shishkin
2016-07-15 22:25 ` [PATCH RFC 2/3] perf/core: update filter only on executable mmap Mathieu Poirier
2016-07-18 11:23 ` Alexander Shishkin
2016-07-15 22:25 ` [PATCH 3/3] perf/core: enabling mapping of the stop filters Mathieu Poirier
2016-07-18 11:31 ` Alexander Shishkin [this message]
2016-07-18 11:35 ` [PATCH 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=871t2rp4hy.fsf@ashishki-desk.ger.corp.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®