tools lib traceevent: Add '~' operation within arg_num_eval()
authorSteven Rostedt <[email protected]>
Fri, 26 Feb 2016 23:13:28 +0000 (18:13 -0500)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 10 Mar 2016 19:27:41 +0000 (16:27 -0300)
commit9eb42dee2b11635174c74a7996934b6ca18f2179
tree0692243d738d14b0d093a6fdea8bdfc7acec7284
parentea8f75f981918c5946fc4029acdc86707fa901c1
tools lib traceevent: Add '~' operation within arg_num_eval()

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 <[email protected]>
Reported-by: Arnaldo Carvalho de Melo <[email protected]>
Tested-by: David Ahern <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/lib/traceevent/event-parse.c