Re: [RFC PATCH v3 1/2] tracing: Add new trace type for bpf data output

From: Peter Zijlstra
Date: Tue Jul 07 2015 - 18:48:21 EST


On Tue, Jul 07, 2015 at 11:43:05AM +0000, He Kuang wrote:
> +FTRACE_ENTRY_REG(bpf, trace_bpf,
> +
> + TRACE_BPF,
> +
> + F_STRUCT(
> + __field(long, size)

I would suggest using either u32 or u64, not a variable size type like
long.

> + __array(u64, raw_data, TRACE_BPF_MAX_ENTRY)
> + ),
> +
> + F_printk("%ld: (%016llx, ...)", __entry->size, __entry->raw_data[0]),
> +
> + FILTER_OTHER,
> +
> + perf_ftrace_event_register
> +);
> --
> 1.8.5.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/