From: Steven Rostedt <[email protected]>
The opterators '-' and '+' are not handled in the trace print format.
To do: '++' and '--'.
Signed-off-by: Steven Rostedt <[email protected]>
---
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
* Steven Rostedt <[email protected]> wrote:
> From: Steven Rostedt <[email protected]>
>
> The opterators '-' and '+' are not handled in the trace print format.
>
> To do: '++' and '--'.
>
> Signed-off-by: Steven Rostedt <[email protected]>
> ---
> 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)
hm, why does this patch change the Makefile?
i've skipped this hunk, it does not appear to be connected to the
commit.
Ingo
On Thu, 2009-10-15 at 08:42 +0200, Ingo Molnar wrote:
> > -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)
>
> hm, why does this patch change the Makefile?
>
> i've skipped this hunk, it does not appear to be connected to the
> commit.
Probably because he wanted to debug things and O6 generates crappy gdb
experience.. and then it slipped into the diff
Commit-ID: afdf1a404eed236d6f762ee44cc0f1dcc97206e0
Gitweb: http://git.kernel.org/tip/afdf1a404eed236d6f762ee44cc0f1dcc97206e0
Author: Steven Rostedt <[email protected]>
AuthorDate: Wed, 14 Oct 2009 15:43:43 -0400
Committer: Ingo Molnar <[email protected]>
CommitDate: Thu, 15 Oct 2009 10:42:40 +0200
perf tools: Handle - and + in parsing trace print format
The opterators '-' and '+' are not handled in the trace print
format.
To do: '++' and '--'.
Signed-off-by: Steven Rostedt <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
tools/perf/util/trace-event-parse.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index fde1a43..2d424ff 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);
}
On Thu, 2009-10-15 at 09:05 +0200, Peter Zijlstra wrote:
> On Thu, 2009-10-15 at 08:42 +0200, Ingo Molnar wrote:
>
> > > -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)
> >
> > hm, why does this patch change the Makefile?
> >
> > i've skipped this hunk, it does not appear to be connected to the
> > commit.
>
> Probably because he wanted to debug things and O6 generates crappy gdb
> experience.. and then it slipped into the diff
Yeah, that's exactly what happened. Damn, I thought I put the -O6 back.
This patch, I originally just did the '-', and thought. Hmm, it is
trivial to do the '+'. So I added it and did a "git commit -a --amend",
forgetting that I modified the Makefile.
This hunk can be ignored.
Thanks!
-- Steve