lkml.org 
[lkml]   [2018]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 3/3]: perf record: extend trace writing to multi AIO
On Tue, Oct 09, 2018 at 11:59:31AM +0300, Alexey Budankov wrote:

SNIP

> @@ -709,12 +729,13 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
> goto out;
> }
> } else {
> + int idx;
> /*
> * Call record__aio_sync() to wait till map->data buffer
> * becomes available after previous aio write request.
> */
> - record__aio_sync(map);
> - if (perf_mmap__aio_push(map, rec, record__aio_pushfn, &off) != 0) {
> + idx = record__aio_sync(map, false);

looks like record__aio_sync can return -1,
how is it not breaking the perf_mmap__aio_push call below?

> + if (perf_mmap__aio_push(map, rec, idx, record__aio_pushfn, &off) != 0) {
> record__aio_set_pos(trace_fd, off);
> rc = -1;
> goto out;

SNIP

\
 
 \ /
  Last update: 2018-10-11 15:47    [W:0.149 / U:0.956 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site