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


Groups > linux.kernel > #1340891 > unrolled thread

Re: [PATCH 11/48] perf data: Support converting data from bpf_perf_event_output()

Started byJiri Olsa <jolsa@redhat.com>
First post2016-02-23 18:30 +0100
Last post2016-02-23 18:30 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 11/48] perf data: Support converting data from  bpf_perf_event_output() Jiri Olsa <jolsa@redhat.com> - 2016-02-23 18:30 +0100
    Re: [PATCH 11/48] perf data: Support converting data from  bpf_perf_event_output() Jiri Olsa <jolsa@redhat.com> - 2016-02-23 18:30 +0100

#1340891 — Re: [PATCH 11/48] perf data: Support converting data from bpf_perf_event_output()

FromJiri Olsa <jolsa@redhat.com>
Date2016-02-23 18:30 +0100
SubjectRe: [PATCH 11/48] perf data: Support converting data from bpf_perf_event_output()
Message-ID<r5oWB-8P-3@gated-at.bofh.it>
On Mon, Feb 22, 2016 at 09:10:38AM +0000, Wang Nan wrote:

SNIP

> ---
>  tools/perf/util/data-convert-bt.c | 112 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 111 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index b722e57..70f462d 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -352,6 +352,84 @@ static int add_tracepoint_values(struct ctf_writer *cw,
>  	return ret;
>  }
>  
> +static int
> +add_bpf_output_values(struct bt_ctf_event_class *event_class,
> +		      struct bt_ctf_event *event,
> +		      struct perf_sample *sample)
> +{
> +	struct bt_ctf_field_type *len_type, *seq_type;
> +	struct bt_ctf_field *len_field, *seq_field;
> +	unsigned int raw_size = sample->raw_size;
> +	unsigned int nr_elements = raw_size / sizeof(u32);
> +	unsigned int i;
> +	int ret;
> +
> +	if (nr_elements * sizeof(u32) != raw_size)

could this be IS_ALIGNED(raw_size, u32)

jirka

[toc] | [next] | [standalone]


#1340893

FromJiri Olsa <jolsa@redhat.com>
Date2016-02-23 18:30 +0100
Message-ID<r5oWC-8P-13@gated-at.bofh.it>
In reply to#1340891
On Tue, Feb 23, 2016 at 06:23:46PM +0100, Jiri Olsa wrote:
> On Mon, Feb 22, 2016 at 09:10:38AM +0000, Wang Nan wrote:
> 
> SNIP
> 
> > ---
> >  tools/perf/util/data-convert-bt.c | 112 +++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 111 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> > index b722e57..70f462d 100644
> > --- a/tools/perf/util/data-convert-bt.c
> > +++ b/tools/perf/util/data-convert-bt.c
> > @@ -352,6 +352,84 @@ static int add_tracepoint_values(struct ctf_writer *cw,
> >  	return ret;
> >  }
> >  
> > +static int
> > +add_bpf_output_values(struct bt_ctf_event_class *event_class,
> > +		      struct bt_ctf_event *event,
> > +		      struct perf_sample *sample)
> > +{
> > +	struct bt_ctf_field_type *len_type, *seq_type;
> > +	struct bt_ctf_field *len_field, *seq_field;
> > +	unsigned int raw_size = sample->raw_size;
> > +	unsigned int nr_elements = raw_size / sizeof(u32);
> > +	unsigned int i;
> > +	int ret;
> > +
> > +	if (nr_elements * sizeof(u32) != raw_size)
> 
> could this be IS_ALIGNED(raw_size, u32)

nah we dont have it.. nevermind ;-)

jirka

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web