Skip to content

Commit

Permalink
perf: Fix parsing of __print_flags() in TP_printk()
Browse files Browse the repository at this point in the history
A update is made to the sched:sched_switch event that adds some
logic to the first parameter of the __print_flags() that shows the
state of tasks. This change cause perf to fail parsing the flags.

A simple fix is needed to have the parser be able to process ops
within the argument.

Cc: [email protected]
Reported-by: Andrew Vagin <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
Steven Rostedt authored and rostedt committed Dec 5, 2011
1 parent bbbf7af commit d06c27b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,8 @@ process_flags(struct event *event, struct print_arg *arg, char **tok)
field = malloc_or_die(sizeof(*field));

type = process_arg(event, field, &token);
while (type == EVENT_OP)
type = process_op(event, field, &token);
if (test_type_token(type, token, EVENT_DELIM, ","))
goto out_free;

Expand Down

0 comments on commit d06c27b

Please sign in to comment.