Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650271

Re: [PATCH v2 10/13] perf header: add a buffer to struct feat_fd

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 10/13] perf header: add a buffer to struct feat_fd
Date 2017-05-25 10:10 +0200
Message-ID <tKW0i-5FH-15@gated-at.bofh.it> (permalink)
References <tKcTv-a4-3@gated-at.bofh.it> <tKcTw-a4-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 @@ static char *do_read_string(struct feat_fd *fd)
>  static int write_tracing_data(struct feat_fd *fd,
>  			      struct perf_evlist *evlist)
>  {
> +	if (fd->buf) {
> +		pr_err("Unsupported write_tracing_data to memory buffer.\n");
> +		return -1;
> +	}

could those messsages mention the pipe mode, this one
does not give clue it's pipe mode related

also together with your following patches, this condition
should never hit right? more like the assert stuff..
WARN_ON/WARN_ON_ONCE maybe

thanks,
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 10/13] perf header: add a buffer to struct feat_fd David Carrillo-Cisneros <davidcc@google.com> - 2017-05-23 10:00 +0200
  Re: [PATCH v2 10/13] perf header: add a buffer to struct feat_fd Jiri Olsa <jolsa@redhat.com> - 2017-05-25 10:10 +0200
  Re: [PATCH v2 10/13] perf header: add a buffer to struct feat_fd Jiri Olsa <jolsa@redhat.com> - 2017-05-25 10:20 +0200
  Re: [PATCH v2 10/13] perf header: add a buffer to struct feat_fd Jiri Olsa <jolsa@redhat.com> - 2017-05-25 10:20 +0200
  Re: [PATCH v2 10/13] perf header: add a buffer to struct feat_fd Jiri Olsa <jolsa@redhat.com> - 2017-05-25 10:20 +0200

csiph-web