[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871t2rp4hy.fsf@ashishki-desk.ger.corp.intel.com>
Date: Mon, 18 Jul 2016 14:31:05 +0300
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: peterz@...radead.org, mingo@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] perf/core: enabling mapping of the stop filters
Mathieu Poirier <mathieu.poirier@...aro.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@...aro.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
Powered by blists - more mailing lists