lkml.org 
[lkml]   [2016]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] perf core: Introduce new ioctl options to pause and resume ring buffer
On Mon, Jan 18, 2016 at 11:52:01AM +0000, Wang Nan wrote:

> +#define PERF_EVENT_IOC_PAUSE_OUTPUT _IO ('$', 9)
> +#define PERF_EVENT_IOC_RESUME_OUTPUT _IO ('$', 10)

Would not a single IOCTL with a 'boolean' parameter make more sense?

> +++ b/kernel/events/ring_buffer.c
> @@ -125,7 +125,7 @@ int perf_output_begin(struct perf_output_handle *handle,
> if (unlikely(!rb))
> goto out;
>
> - if (unlikely(!rb->nr_pages))
> + if (unlikely(rb->paused))
> goto out;

Should we increment rb->lost in this case?

\
 
 \ /
  Last update: 2016-01-18 13:41    [W:0.129 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site