[lkml]   [2016]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 27/53] perf/core: Put size of a sample at the end of it by PERF_SAMPLE_TAILSIZE
On Mon, Jan 11, 2016 at 01:48:18PM +0000, Wang Nan wrote:
> Before reading such ring buffer, perf must ensure all events which may
> output to it is already stopped, so the 'head' pointer it get is the
> end of the last record.

We could add an extra ioctl() to pause/resume ring-buffer output to make
this more convenient to achieve.

Say replace the !rb->nr_pages test in perf_output_begin() with a control
variable load and ensure its set to pause/fail when !nr_pages.

That way we only have to issue a single ioctl to freeze the buffer,
without adding extra instructions/loads to the fast path.

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