[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180828085343.GF23727@krava>
Date: Tue, 28 Aug 2018 10:53:43 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/2]: perf record: enable asynchronous trace writing
On Mon, Aug 27, 2018 at 09:16:55PM +0300, Alexey Budankov wrote:
SNIP
> if ((md->start & md->mask) + size != (md->end & md->mask)) {
> buf = &data[md->start & md->mask];
> - size = md->mask + 1 - (md->start & md->mask);
> - md->start += size;
> -
> - if (push(to, buf, size) < 0) {
> - rc = -1;
> - goto out;
> - }
> + size0 = md->mask + 1 - (md->start & md->mask);
> + md->start += size0;
> + memcpy(md->data, buf, size0);
> }
>
> buf = &data[md->start & md->mask];
> size = md->end - md->start;
> md->start += size;
> + memcpy(md->data + size0, buf, size);
>
> - if (push(to, buf, size) < 0) {
> - rc = -1;
> + rc = push(to, md, size0 + size, *off) < 0 ? -1 : 1;
> + if (rc == -1)
> goto out;
> - }
> +
> + perf_mmap__get(md);
> + *off += size0 + size;
this get is for the perf_mmap pointer storage in the mmap_aio array right?
I see it's released in record__mmap_read_sync, which might also return
without releasing it.. this needs to be fixed and explained in here,
why we take the reference in the first place
thanks,
jirka
Powered by blists - more mailing lists