From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756209AbbCCONT (ORCPT ); Tue, 3 Mar 2015 09:13:19 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:34180 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754148AbbCCONS (ORCPT ); Tue, 3 Mar 2015 09:13:18 -0500 Date: Tue, 3 Mar 2015 23:12:38 +0900 From: Namhyung Kim To: Javi Merino Cc: acme@redhat.com, jolsa@redhat.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 2/2] tools lib traceevent: Add support for __print_array() Message-ID: <20150303141238.GC27046@danjae> References: <1425320262-7096-1-git-send-email-javi.merino@arm.com> <1425320262-7096-3-git-send-email-javi.merino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1425320262-7096-3-git-send-email-javi.merino@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 [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 >