* [PATCH] tools lib traceeveent: Allow for negative numbers in print format
@ 2015-08-27 13:46 Steven Rostedt
2015-08-27 13:55 ` Vlastimil Babka
2015-08-31 8:30 ` [tip:perf/core] " tip-bot for Steven Rostedt
0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2015-08-27 13:46 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: LKML, Namhyung Kim, Vlastimil Babka
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.
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/lib/traceevent/event-parse.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index cc25f059ab3d..3b01ae137d95 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -4754,6 +4754,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
case 'z':
case 'Z':
case '0' ... '9':
+ case '-':
goto cont_process;
case 'p':
if (pevent->long_size == 4)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools lib traceeveent: Allow for negative numbers in print format
2015-08-27 13:46 [PATCH] tools lib traceeveent: Allow for negative numbers in print format Steven Rostedt
@ 2015-08-27 13:55 ` Vlastimil Babka
2015-08-27 14:15 ` Arnaldo Carvalho de Melo
2015-08-31 8:30 ` [tip:perf/core] " tip-bot for Steven Rostedt
1 sibling, 1 reply; 4+ messages in thread
From: Vlastimil Babka @ 2015-08-27 13:55 UTC (permalink / raw)
To: Steven Rostedt, Arnaldo Carvalho de Melo; +Cc: LKML, Namhyung Kim
On 08/27/2015 03:46 PM, Steven Rostedt wrote:
>
> 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.
>
> Reported-by: Vlastimil Babka <vbabka@suse.cz>
Reported-and-tested-by: Vlastimil Babka <vbabka@suse.cz>
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
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
> tools/lib/traceevent/event-parse.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index cc25f059ab3d..3b01ae137d95 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -4754,6 +4754,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
> case 'z':
> case 'Z':
> case '0' ... '9':
> + case '-':
> goto cont_process;
> case 'p':
> if (pevent->long_size == 4)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools lib traceeveent: Allow for negative numbers in print format
2015-08-27 13:55 ` Vlastimil Babka
@ 2015-08-27 14:15 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-27 14:15 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: Steven Rostedt, LKML, Namhyung Kim
Em Thu, Aug 27, 2015 at 03:55:56PM +0200, Vlastimil Babka escreveu:
> On 08/27/2015 03:46 PM, Steven Rostedt wrote:
> >
> >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.
> >
> >Reported-by: Vlastimil Babka <vbabka@suse.cz>
>
> Reported-and-tested-by: Vlastimil Babka <vbabka@suse.cz>
>
> 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
Thanks, applied and added the before/after reporter notes. It is now in
my perf/core branch.
- Arnaldo
> >Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> >---
> > tools/lib/traceevent/event-parse.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> >index cc25f059ab3d..3b01ae137d95 100644
> >--- a/tools/lib/traceevent/event-parse.c
> >+++ b/tools/lib/traceevent/event-parse.c
> >@@ -4754,6 +4754,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
> > case 'z':
> > case 'Z':
> > case '0' ... '9':
> >+ case '-':
> > goto cont_process;
> > case 'p':
> > if (pevent->long_size == 4)
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] tools lib traceeveent: Allow for negative numbers in print format
2015-08-27 13:46 [PATCH] tools lib traceeveent: Allow for negative numbers in print format Steven Rostedt
2015-08-27 13:55 ` Vlastimil Babka
@ 2015-08-31 8:30 ` tip-bot for Steven Rostedt
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Steven Rostedt @ 2015-08-31 8:30 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, vbabka, namhyung, rostedt, tglx, hpa, mingo
Commit-ID: 1d945012d1381f0232ea2d66e32b06182eedb476
Gitweb: http://git.kernel.org/tip/1d945012d1381f0232ea2d66e32b06182eedb476
Author: Steven Rostedt <rostedt@goodmis.org>
AuthorDate: Thu, 27 Aug 2015 09:46:01 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Aug 2015 11:47:40 -0300
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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 5c1867a..4d88593 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -4828,6 +4828,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
case 'z':
case 'Z':
case '0' ... '9':
+ case '-':
goto cont_process;
case 'p':
if (pevent->long_size == 4)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-31 8:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27 13:46 [PATCH] tools lib traceeveent: Allow for negative numbers in print format Steven Rostedt
2015-08-27 13:55 ` Vlastimil Babka
2015-08-27 14:15 ` Arnaldo Carvalho de Melo
2015-08-31 8:30 ` [tip:perf/core] " tip-bot for Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox