On Tue, May 23, 2017 at 12:48:50AM -0700, David Carrillo-Cisneros wrote:
SNIP
> @@ -795,11 +831,19 @@ static int write_pmu_mappings(struct feat_fd *fd,
> struct perf_evlist *evlist __maybe_unused)
> {
> struct perf_pmu *pmu = NULL;
> - off_t offset = lseek(f
On Tue, May 23, 2017 at 12:48:50AM -0700, David Carrillo-Cisneros wrote:
SNIP
> @@ -82,11 +83,27 @@ bool perf_header__has_feat(const struct perf_header
> *header, int feat)
> /* Return: 0 if succeded, -ERR if failed. */
> int do_write(struct feat_fd *fd, const void *buf, size_t size)
> {
> -
On Tue, May 23, 2017 at 12:48:50AM -0700, David Carrillo-Cisneros wrote:
> Extend struct feat_fd to use a temporal buffer in pipe-mode, rather
> than a perf.data file.
>
> Revamp write_pmu_mappings to avoid seeking so that is compatible with
> pipe-mode.
>
> Print an error when trying to use buf
On Tue, May 23, 2017 at 12:48:50AM -0700, David Carrillo-Cisneros wrote:
SNIP
> +
> + memcpy(addr, fd->buf + fd->offset, size);
> + fd->offset += size;
>
> - if (ret != (ssize_t)size)
> - return ret < 0 ? (int)ret : -1;
> return 0;
> }
>
> @@ -187,6 +215,10 @@ s
4 matches
Mail list logo