perf tools: Handle - and + in parsing trace print format
authorSteven Rostedt <srostedt@redhat.com>
Wed, 14 Oct 2009 19:43:43 +0000 (15:43 -0400)
committerIngo Molnar <mingo@elte.hu>
Thu, 15 Oct 2009 08:42:40 +0000 (10:42 +0200)
The opterators '-' and '+' are not handled in the trace print
format.

To do: '++' and '--'.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20091014194400.330843045@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/trace-event-parse.c

index fde1a434d630cf861435524dc3fe50cf64860c7e..2d424ff50ec27f8f98f65ad9d6efd52dc5f3c56c 100644 (file)
@@ -2106,6 +2106,12 @@ static unsigned long long eval_num_arg(void *data, int size,
                                die("unknown op '%s'", arg->op.op);
                        val = left == right;
                        break;
+               case '-':
+                       val = left - right;
+                       break;
+               case '+':
+                       val = left + right;
+                       break;
                default:
                        die("unknown op '%s'", arg->op.op);
                }