Re: [PATCH 7/7] perf tools: add feature header record to pipe-mode

From: Jiri Olsa
Date: Thu May 18 2017 - 12:13:53 EST


On Wed, May 17, 2017 at 09:16:02PM -0700, David Carrillo-Cisneros wrote:

SNIP

> - (*p)->offset = lseek(fd->fd, 0, SEEK_CUR);
> + (*p)->offset = lseek(fdd->fd, 0, SEEK_CUR);
>
> - err = feat_ops[type].write(fd, evlist);
> + err = feat_ops[type].write(fdd, evlist);
> if (err < 0) {
> pr_debug("failed to write feature %s\n", feat_ops[type].name);
>
> /* undo anything written */
> - lseek(fd->fd, (*p)->offset, SEEK_SET);
> + lseek(fdd->fd, (*p)->offset, SEEK_SET);
>
> return -1;
> }
> - (*p)->size = lseek(fd->fd, 0, SEEK_CUR) - (*p)->offset;
> + (*p)->size = lseek(fdd->fd, 0, SEEK_CUR) - (*p)->offset;
> (*p)++;
> }
> return ret;
> @@ -2261,10 +2301,6 @@ static int perf_header__adds_write(struct perf_header *header,
> int feat;
> int err;
>
> - /*
> - * may write more than needed due to dropped feature, but
> - * this is okay, reader will skip the mising entries
> - */

you added this comment in earlier patch, if you don't want it,
remove it in the original patch

jirka