lkml.org 
[lkml]   [2018]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 2/2]: perf record: enable asynchronous trace writing
On Wed, Sep 05, 2018 at 10:39:25AM +0300, Alexey Budankov wrote:

SNIP

> diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
> index 384d17cd1379..1d57d8387caf 100644
> --- a/tools/perf/util/mmap.c
> +++ b/tools/perf/util/mmap.c
> @@ -332,12 +332,12 @@ int perf_mmap__read_init(struct perf_mmap *map)
> return __perf_mmap__read_init(map);
> }
>
> -int perf_mmap__push(struct perf_mmap *md, void *to,
> - int push(void *to, void *buf, size_t size))
> +int perf_mmap__push(struct perf_mmap *md, void *to, int idx,
> + int push(void *to, struct aiocb *cblock, void *data, size_t size))
> {
> u64 head = perf_mmap__read_head(md);
> unsigned char *data = md->base + page_size;
> - unsigned long size;
> + unsigned long size, size0 = 0;
> void *buf;
> int rc = 0;
>
> @@ -345,31 +345,58 @@ int perf_mmap__push(struct perf_mmap *md, void *to,
> if (rc < 0)
> return (rc == -EAGAIN) ? 0 : -1;
>
> + /* md->base data is copied into md->data[idx] buffer to
> + * release space in the kernel buffer as fast as possible,

please start the comment with the extra '/*', like:

/*
* md->base data is copied into md->data[idx] buffer to
* release space in the kernel buffer as fast as possible,
...

jirka

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