Skip to content

Commit

Permalink
parse-events: Allow '*' and '/' operations in TP_printk
Browse files Browse the repository at this point in the history
Add multiply and divide operations in the printk format.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arun Sharma <asharma@fb.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Steven Rostedt authored and Frederic Weisbecker committed Apr 25, 2012
1 parent b482859 commit 2e7a5fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3130,6 +3130,12 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg
case '+':
val = left + right;
break;
case '/':
val = left / right;
break;
case '*':
val = left * right;
break;
default:
die("unknown op '%s'", arg->op.op);
}
Expand Down

0 comments on commit 2e7a5fc

Please sign in to comment.