diff mbox series

[1/2] libtraceevent: Remove extra \n in print_event_time()

Message ID 20191025065323.479273995@goodmis.org (mailing list archive)
State Accepted
Commit 1b5c90710a2746919266bdc278fbb255c3ffe847
Headers show
Series [1/2] libtraceevent: Remove extra \n in print_event_time() | expand

Commit Message

Steven Rostedt Oct. 25, 2019, 6:52 a.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

If the precesion of print_event_time() is zero or greater than the
timestamp, it uses a different format. But that format had an extra new line
at the end, and caused the output to not look right:

cpus=2
           sleep-3946  [001]111264306005
: function:             inotify_inode_queue_event
           sleep-3946  [001]111264307158
: function:             __fsnotify_parent
           sleep-3946  [001]111264307637
: function:             inotify_dentry_parent_queue_event
           sleep-3946  [001]111264307989
: function:             fsnotify
           sleep-3946  [001]111264308401
: function:             audit_syscall_exit

Fixes: 150d479b623a ("libtraceevent, perf tools: Changes in tep_print_event_* APIs")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 lib/traceevent/event-parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/traceevent/event-parse.c b/lib/traceevent/event-parse.c
index eb84fbb49e4d..0a49eb936b34 100644
--- a/lib/traceevent/event-parse.c
+++ b/lib/traceevent/event-parse.c
@@ -5528,7 +5528,7 @@  static void print_event_time(struct tep_handle *tep, struct trace_seq *s,
 	if (p10 > 1 && p10 < time)
 		trace_seq_printf(s, "%5llu.%0*llu", time / p10, prec, time % p10);
 	else
-		trace_seq_printf(s, "%12llu\n", time);
+		trace_seq_printf(s, "%12llu", time);
 }
 
 struct print_event_type {