Re: [PATCH 38/48] perf record: Read record thread's mmaps
From: Jiri Olsa
Date: Sun Sep 23 2018 - 15:35:27 EST
On Mon, Sep 17, 2018 at 08:28:37PM +0900, Namhyung Kim wrote:
SNIP
> > -
> > - if (track_map && track_map->base) {
> > - if (perf_mmap__push(track_map, rec, record__pushfn) != 0) {
> > - rc = -1;
> > - goto out;
> > - }
> > - }
> > }
> >
> > /*
> > * Mark the round finished in case we wrote
> > * at least one event.
> > */
> > - if (bytes_written != rec->bytes_written)
> > - rc = record__write(rec, NULL, &finished_round_event, sizeof(finished_round_event));
> > + if (bytes_written != rec->bytes_written) {
> > + /*
> > + * All maps of the threads point to a single file,
> > + * so we can just pick first one.
> > + */
> > + rc = record__write(rec, thread->mmap[0], &finished_round_event,
>
> Shouldn't it be maps[0] ?
yep, overwrite wouldn't work..
thanks,
jirka