lkml.org 
[lkml]   [2015]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/7] perf: Free aux pages in unmap path
Date
Alexander Shishkin <alexander.shishkin@linux.intel.com> writes:

> I also hacked perf_event_aux_ctx() to make the above work, like so:
>
> @@ -5696,15 +5696,18 @@ typedef void (perf_event_aux_output_cb)(struct perf_event *event, void *data);
> static void
> perf_event_aux_ctx(struct perf_event_context *ctx,
> perf_event_aux_output_cb output,
> - void *data)
> + void *data, bool all)
> {
> struct perf_event *event;
>
> list_for_each_entry_rcu(event, &ctx->event_list, event_entry) {
> - if (event->state < PERF_EVENT_STATE_INACTIVE)
> - continue;
> - if (!event_filter_match(event))
> - continue;
> + if (!all) {
> + if (event->state < PERF_EVENT_STATE_INACTIVE)
> + continue;
> + if (!event_filter_match(event))
> + continue;
> + }
> +
> output(event, data);
> }
> }
>

This last bit is actually not needed at all, not for the task at hand anyway.

Regards,
--
Alex


\
 
 \ /
  Last update: 2015-12-10 14:21    [W:0.171 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site