On Thu, 12 Aug 2021 11:59:27 +0300 "Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote: > The existing method tep_print_fields() gets upgraded to use the > printing formats provided by the tokens. > > Suggested-by: Steven Rostedt <rostedt@xxxxxxxxxxx> > Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> > --- > src/event-parse.c | 115 +++++++++++++++++++++++++++++++++++----------- > 1 file changed, 87 insertions(+), 28 deletions(-) > > diff --git a/src/event-parse.c b/src/event-parse.c > index 02ec677..ff7337f 100644 > --- a/src/event-parse.c > +++ b/src/event-parse.c > @@ -3913,7 +3913,6 @@ eval_num_arg(void *data, int size, struct tep_event *event, struct tep_print_arg > arg->field.field = tep_find_any_field(event, arg->field.name); > if (!arg->field.field) > goto out_warning_field; > - > } > /* must be a number */ > val = tep_read_number(tep, data + arg->field.field->offset, > @@ -5326,8 +5325,8 @@ static int is_printable_array(char *p, unsigned int len) > return 1; > } > > -void tep_print_field(struct trace_seq *s, void *data, > - struct tep_format_field *field) > +static void tep_print_field_raw(struct trace_seq *s, void *data, > + struct tep_format_field *field) As this is static, lets call it just "print_field_raw()" as the "tep_" prefix should be reserved for the API only. We may need to clean up any existing static function that start with "tep_", but that can be a separate patch (if any exist, I haven't looked). But let's not add new ones. -- Steve > { > struct tep_handle *tep = field->event->tep; > unsigned int offset, len, i; > @@ -5389,6 +5388,56 @@ void tep_print_field(struct trace_seq *s, void *data, > } > } > > +static int print_parse_data(struct tep_print_parse *parse, struct trace_seq *s, > + void *data, int size, struct tep_event *event); > + > +void tep_print_field(struct trace_seq *s, void *data, > + struct tep_format_field *field) > +{ > + struct tep_event *event = field->event; > + struct tep_print_parse *parse; > + bool has_0x; > + > +