lkml.org 
[lkml]   [2018]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 2/2]: perf record: enable asynchronous trace writing
From
Date


On 06.09.2018 14:04, Jiri Olsa wrote:
> On Wed, Sep 05, 2018 at 10:39:25AM +0300, Alexey Budankov wrote:
>
> SNIP
>
>> + } else if (errno != EAGAIN) {
>> + cblock->aio_fildes = -1;
>> + pr_err("failed to queue perf data, error: %m\n");
>> + break;
>> + }
>> + } while (1);
>> +
>> + return rc;
>> +}
>> +
>> +static int record__aio_sync(struct perf_mmap *md)
>> +{
>
> this is almost identical to record__aio_sync function,
> it looks like we should be able to do the sync with
> single function.. for both the in-between syncs and
> the final one

There is some code duplication here. for()'s loop body at
record__aio_complete() could probably be separated to
a function and then reused by record__aio_sync().
The rest is not obvious at the moment.

>
> jirka
>

\
 
 \ /
  Last update: 2018-09-06 14:11    [W:2.230 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site