diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-11-01 17:53:57 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-04 12:35:35 -0500 |
commit | 0883d9d730fc294c3d90ebd190b94e5782ead316 (patch) | |
tree | a944b5b2e20589df88d9efcb4cc001b65f3e4139 /tools | |
parent | b30f75eba27a9ab0704cbc501e9be3b025ce56fe (diff) |
tools lib traceevent: Have bprintk output the same as the kernel does
The trace_bprintk() in the kernel looks like:
ring_buffer_producer_thread: Missed: 0
ring_buffer_producer_thread: Hit: 62174350
ring_buffer_producer_thread: Entries per millisec: 6296
ring_buffer_producer_thread: 158 ns per entry
ring_buffer_producer_thread: Sleeping for 10 secs
ring_buffer_producer_thread: Starting ring buffer hammer
ring_buffer_producer_thread: End ring buffer hammer
But the current output looks like this:
ring_buffer_producer_thread : Time: 9407018 (usecs)
ring_buffer_producer_thread : Overruns: 43285485
ring_buffer_producer_thread : Read: 4405365 (by events)
ring_buffer_producer_thread : Entries: 0
ring_buffer_producer_thread : Total: 47690850
ring_buffer_producer_thread : Missed: 0
ring_buffer_producer_thread : Hit: 47690850
Remove the space between the function and the colon.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20131101215501.272654481@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 0a1ffe07de3f..e1c743c52834 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -3802,8 +3802,8 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc | |||
3802 | if (asprintf(&arg->atom.atom, "%lld", ip) < 0) | 3802 | if (asprintf(&arg->atom.atom, "%lld", ip) < 0) |
3803 | goto out_free; | 3803 | goto out_free; |
3804 | 3804 | ||
3805 | /* skip the first "%pf : " */ | 3805 | /* skip the first "%pf: " */ |
3806 | for (ptr = fmt + 6, bptr = data + field->offset; | 3806 | for (ptr = fmt + 5, bptr = data + field->offset; |
3807 | bptr < data + size && *ptr; ptr++) { | 3807 | bptr < data + size && *ptr; ptr++) { |
3808 | int ls = 0; | 3808 | int ls = 0; |
3809 | 3809 | ||
@@ -3929,12 +3929,12 @@ get_bprint_format(void *data, int size __maybe_unused, | |||
3929 | 3929 | ||
3930 | printk = find_printk(pevent, addr); | 3930 | printk = find_printk(pevent, addr); |
3931 | if (!printk) { | 3931 | if (!printk) { |
3932 | if (asprintf(&format, "%%pf : (NO FORMAT FOUND at %llx)\n", addr) < 0) | 3932 | if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0) |
3933 | return NULL; | 3933 | return NULL; |
3934 | return format; | 3934 | return format; |
3935 | } | 3935 | } |
3936 | 3936 | ||
3937 | if (asprintf(&format, "%s : %s", "%pf", printk->printk) < 0) | 3937 | if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0) |
3938 | return NULL; | 3938 | return NULL; |
3939 | 3939 | ||
3940 | return format; | 3940 | return format; |