tools lib traceeveent: Allow for negative numbers in print format
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 27 Aug 2015 13:46:01 +0000 (09:46 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 28 Aug 2015 14:47:40 +0000 (11:47 -0300)
commit1d945012d1381f0232ea2d66e32b06182eedb476
tree455b67f4c25d448a0178fe01a0d284bda64072cb
parent77e0070da41f76e1ebd15291fb0254b0c174adfa
tools lib traceeveent: Allow for negative numbers in print format

It was reported that "%-8s" does not parse well when used in the printk
format. The '-' is what is throwing it off. Allow that to be included.

Reporter note:

Example before:

  transhuge-stres-10730 [004]  5897.713989: mm_compaction_finished: node=0
  zone=>-<8s order=-2119871790 ret=

Example after:

  transhuge-stres-4235  [000]   453.149280: mm_compaction_finished: node=0
  zone=ffffffff81815d7a order=9 ret=

(I will send patches to fix the string handling in the tracepoints so
it's on par with in-kernel printing via trace_pipe:)

  transhuge-stres-10921 [007] ...1  6307.140205: mm_compaction_finished: node=0
  zone=Normal   order=9 ret=partial

Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150827094601.46518bcc@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c