Re: [PATCH v7 2/2] tools lib traceevent: Add support for __print_array()
From: Namhyung Kim
Date: Tue Mar 03 2015 - 09:13:23 EST
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@xxxxxxxxxx>
[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
>
--
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/