* [PATCH] tools lib traceevent: Remove extra '\n' in print_event_time()
@ 2020-03-04 4:18 Steven Rostedt
2020-03-04 12:59 ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Steven Rostedt (VMware)
0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2020-03-04 4:18 UTC (permalink / raw)
To: LKML; +Cc: Arnaldo Carvalho de Melo, Jiri Olsa
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: 38847db9740a ("libtraceevent, perf tools: Changes in tep_print_event_* APIs")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
tools/lib/traceevent/event-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index beaa8b8c08ff..e1bd2a93c6db 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -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 {
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools lib traceevent: Remove extra '\n' in print_event_time()
2020-03-04 4:18 [PATCH] tools lib traceevent: Remove extra '\n' in print_event_time() Steven Rostedt
@ 2020-03-04 12:59 ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Steven Rostedt (VMware)
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-03-04 12:59 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, Jiri Olsa
Em Tue, Mar 03, 2020 at 11:18:52PM -0500, Steven Rostedt escreveu:
>
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> If the precesion of print_event_time() is zero or greater than the
precision, right?
Thanks, applied.
- Arnaldo
> 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: 38847db9740a ("libtraceevent, perf tools: Changes in tep_print_event_* APIs")
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
> tools/lib/traceevent/event-parse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index beaa8b8c08ff..e1bd2a93c6db 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -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 {
> --
> 2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: perf/core] tools lib traceevent: Remove extra '\n' in print_event_time()
2020-03-04 4:18 [PATCH] tools lib traceevent: Remove extra '\n' in print_event_time() Steven Rostedt
2020-03-04 12:59 ` Arnaldo Carvalho de Melo
@ 2020-03-19 14:10 ` tip-bot2 for Steven Rostedt (VMware)
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Steven Rostedt (VMware) @ 2020-03-19 14:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: Steven Rostedt (VMware), Jiri Olsa, Arnaldo Carvalho de Melo, x86, LKML
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) <rostedt@goodmis.org>
AuthorDate: Tue, 03 Mar 2020 23:18:52 -05:00
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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
Fixes: 38847db9740a ("libtraceevent, perf tools: Changes in tep_print_event_* APIs")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20200303231852.6ab6882f@oasis.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/traceevent/event-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index beaa8b8..e1bd2a9 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -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 {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-19 14:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 4:18 [PATCH] tools lib traceevent: Remove extra '\n' in print_event_time() Steven Rostedt
2020-03-04 12:59 ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] " tip-bot2 for Steven Rostedt (VMware)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).