Messages in this thread Patch in this message | | | Date | Wed, 14 Oct 2009 15:43:43 -0400 | From | Steven Rostedt <> | Subject | [PATCH 12/13] [PATCH 12/13] perf tools: handle - and + in parsing trace print format |
| |
From: Steven Rostedt <srostedt@redhat.com>
The opterators '-' and '+' are not handled in the trace print format.
To do: '++' and '--'.
Signed-off-by: Steven Rostedt <srostedt@redhat.com> --- tools/perf/Makefile | 2 +- tools/perf/util/trace-event-parse.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 495eb6d..1172aa7 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -194,7 +194,7 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement -CFLAGS = $(M64) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) +CFLAGS = $(M64) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) LDFLAGS = -lpthread -lrt -lelf -lm ALL_CFLAGS = $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS) diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index d3b0b2a..b8edc9d 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c @@ -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); } -- 1.6.3.3
| |