lkml.org 
[lkml]   [2015]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v7 2/2] tools lib traceevent: Add support for __print_array()
Hi Javi,

On Mon, Mar 02, 2015 at 06:17:42PM +0000, Javi Merino wrote:
> Since 6ea22486ba46 ("tracing: Add array printing helper") trace can
> traces with variable element size arrays. Add support to parse them.

I just have a nitpick below - otherwise both patches look good, so

Acked-by: Namhyung Kim <namhyung@kernel.org>


[SNIP]
> diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
> index 7a3873ff9a4f..5ac3e3c00389 100644
> --- a/tools/lib/traceevent/event-parse.h
> +++ b/tools/lib/traceevent/event-parse.h
> @@ -245,6 +245,12 @@ struct print_arg_hex {
> struct print_arg *size;
> };
>
> +struct print_arg_int_array {
> + struct print_arg *field;
> + struct print_arg *size;

I think it'd be better to call this field as 'count' rather than
'size' since it's clearer and consistent with the in-kernel
__print_array() function.

Thanks,
Namhyung


> + struct print_arg *el_size;
> +};
> +
> struct print_arg_dynarray {
> struct format_field *field;
> struct print_arg *index;
> @@ -273,6 +279,7 @@ enum print_arg_type {
> PRINT_FLAGS,
> PRINT_SYMBOL,
> PRINT_HEX,
> + PRINT_INT_ARRAY,
> PRINT_TYPE,
> PRINT_STRING,
> PRINT_BSTRING,
> @@ -292,6 +299,7 @@ struct print_arg {
> struct print_arg_flags flags;
> struct print_arg_symbol symbol;
> struct print_arg_hex hex;
> + struct print_arg_int_array int_array;
> struct print_arg_func func;
> struct print_arg_string string;
> struct print_arg_bitmask bitmask;
> --
> 1.9.1
>


\
 
 \ /
  Last update: 2015-03-03 15:21    [W:0.087 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site