On Fri, 6 Mar 2015 18:35:18 +0000 Javi Merino <javi.mer...@arm.com> wrote:
> Since 6ea22486ba46 ("tracing: Add array printing helper") trace can > traces with variable element size arrays. Add support to parse them. > > Cc: Arnaldo Carvalho de Melo <a...@redhat.com> > Cc: Jiri Olsa <jo...@redhat.com> > Cc: Steven Rostedt <rost...@goodmis.org> Both patches look fine to me. You can add my: Acked-by: Steven Rostedt <rost...@goodmis.org> > Acked-by: Namhyung Kim <namhy...@kernel.org> > Signed-off-by: Javi Merino <javi.mer...@arm.com> > --- > tools/lib/traceevent/event-parse.c | 93 > ++++++++++++++++++++++++++++++++++++++ > tools/lib/traceevent/event-parse.h | 8 ++++ > 2 files changed, 101 insertions(+) > > + if (arg->int_array.field->type == PRINT_DYNAMIC_ARRAY) { > + unsigned long offset; > + struct format_field *field = > + arg->int_array.field->dynarray.field; > + offset = pevent_read_number(pevent, > + data + field->offset, > + field->size); > + num = data + (offset & 0xffff); Unrelated to this patch set, but we really should make that 0xffff a named define. Something like this perhaps? #define DYNAMIC_OFFSET_MASK 0xffff #define DYNAMIC_LENGTH_SHIFT 16 and even add: #define dynamic_offset(num) ((num) & DYNAMIC_OFFSET_MASK) #define dynamic_length(num) ((num) >> DYNAMIC_LENGTH_SHIFT) and use these macros instead. Again, this has nothing to do with the acceptance of this patch set. Just something that this patch set reminds me that we should do. -- Steve > + } else { > + field = arg->int_array.field->field.field; > + if (!field) { > + str = arg->int_array.field->field.name; > + field = pevent_find_any_field(event, str); > + if (!field) > + goto out_warning_field; > + arg->int_array.field->field.field = field; > + } > + num = data + field->offset; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/