parse-events: Allow '*' and '/' operations in TP_printk
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>
This commit is contained in:
Родитель
b48285980d
Коммит
2e7a5fc8d4
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче