tools lib traceevent: Remove extra '\n' in print_event_time()
PATCH 1/1 tools lib traceevent: Remove extra '\n' in print_event_time()
From: "Steven Rostedt (VMware)" <[email protected]>
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
--- tools/lib/traceevent/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/traceevent/event-parse.c +1 -1
@@ -5541,7 +5541,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 {
Signature · 1 line
2.20.1
Arnaldo Carvalho de Melo
AppliedEm Tue, Mar 03, 2020 at 11:18:52PM -0500, Steven Rostedt escreveu:
Quoted 4 lines
From: "Steven Rostedt (VMware)" <[email protected]>
If the precesion of
print_event_time()is zero or greater than the
precision, right?
Thanks, applied.
- Arnaldo
Quoted 36 lines
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_exitFixes 38847db9740a ("libtraceevent, perf tools: Changes in tep_print_event_* APIs")Signed-off-by Steven Rostedt (VMware) <[email protected]>--- tools/lib/traceevent/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/lib/traceevent/event-parse.c +1
-1@@ -5541,7 +5541,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 {Signature · 1 line
2.20.1
The following commit has been merged into the perf/core branch of tip:
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 401d61cbd4d4c6b44b2a895ab4073c7f214c096b Gitweb: https://git.kernel.org/tip/401d61cbd4d4c6b44b2a895ab4073c7f214c096b Author: Steven Rostedt (VMware) <[email protected]> AuthorDate: Tue, 03 Mar 2020 23:18:52 -05:00 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Wed, 04 Mar 2020 10:34:10 -03:00
tools lib traceevent: Remove extra '\n' in print_event_time()
If the precision 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
--- tools/lib/traceevent/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/traceevent/event-parse.c +1 -1
@@ -5541,7 +5541,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 {