lkml.org 
[lkml]   [2016]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 11/48] perf data: Support converting data from bpf_perf_event_output()
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

\
 
 \ /
  Last update: 2016-02-23 19:01    [W:0.407 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site