Re: [PATCH 1/2] perf: Add persistent event facilities

From: Peter Zijlstra
Date: Fri May 18 2012 - 06:02:10 EST


On Wed, 2012-03-21 at 15:34 +0100, Borislav Petkov wrote:
> From: Borislav Petkov <borislav.petkov@xxxxxxx>
>
> Add a barebones implementation for registering persistent events with
> perf. For that, we don't destroy the buffers when they're unmapped;
> also, we map them read-only so that multiple agents can access them.

> +static struct perf_event *perf_add_persistent(struct perf_event_attr *attr,
> + int cpu, unsigned nr_pages)
> +{
> + struct ring_buffer *buffer;
> + struct perf_event *event;
> +
> + event = perf_event_create_kernel_counter(attr, cpu, NULL, NULL, NULL);
> + if (IS_ERR(event))
> + return event;
> +
> + buffer = rb_alloc(nr_pages, 0, cpu, RING_BUFFER_WRITABLE);

Uh what?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/