Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344816
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] tools lib traceevent: Add '~' operation within arg_num_eval() |
| Date | 2016-02-27 00:20 +0100 |
| Message-ID | <r6zPY-26L-13@gated-at.bofh.it> (permalink) |
| References | <r6vMm-7w1-7@gated-at.bofh.it> <r6vMm-7w1-5@gated-at.bofh.it> <r6yqT-W4-29@gated-at.bofh.it> <r6yqU-W4-39@gated-at.bofh.it> <r6yKe-1lH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When evaluating values for print flags, if the value included a '~'
operator, the parsing would fail. This broke kmalloc's parsing of:
__print_flags(REC->gfp_flags, "|", {(unsigned
long)((((((( gfp_t)(0x400000u|0x2000000u)) | (( gfp_t)0x40u) |
(( gfp_t)0x80u) | (( gfp_t)0x20000u)) | (( gfp_t)0x02u)) |
(( gfp_t)0x08u)) | (( gfp_t)0x4000u) | (( gfp_t)0x10000u) |
(( gfp_t)0x1000u) | (( gfp_t)0x200u)) & ~(( gfp_t)0x2000000u))
^
|
here
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index c3bd294a63d1..557d8edf07f3 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2397,6 +2397,12 @@ static int arg_num_eval(struct print_arg *arg, long long *val)
break;
*val = left + right;
break;
+ case '~':
+ ret = arg_num_eval(arg->op.right, &right);
+ if (!ret)
+ break;
+ *val = ~right;
+ break;
default:
do_warning("unknown op '%s'", arg->op.op);
ret = 0;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-02-26 20:00 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-26 22:50 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-26 22:50 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-26 23:10 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-26 23:30 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Steven Rostedt <rostedt@goodmis.org> - 2016-02-26 23:30 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-26 23:40 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Jiri Olsa <jolsa@redhat.com> - 2016-02-27 00:20 +0100
Re: [PATCH 4/5] perf report: Fix dynamic entry display in hierarchy Jiri Olsa <jolsa@redhat.com> - 2016-02-27 00:20 +0100
[PATCH] tools lib traceevent: Add '~' operation within arg_num_eval() Steven Rostedt <rostedt@goodmis.org> - 2016-02-27 00:20 +0100
Re: [PATCH] tools lib traceevent: Add '~' operation within arg_num_eval() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-27 00:40 +0100
Re: [PATCH] tools lib traceevent: Add '~' operation within arg_num_eval() David Ahern <dsahern@gmail.com> - 2016-02-27 00:50 +0100
[tip:perf/core] perf hists: Fix dynamic entry display in hierarchy tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-27 10:50 +0100
csiph-web