From: Steven Rostedt <rostedt@goodmis.org>
To: Jungseok Lee <jungseoklee85@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] tracing: Fix function graph duration format for 7-digit number
Date: Thu, 16 Jul 2015 21:44:36 -0400 [thread overview]
Message-ID: <20150716214436.741dff47@grimm.local.home> (raw)
In-Reply-To: <1436626300-1679-2-git-send-email-jungseoklee85@gmail.com>
On Sat, 11 Jul 2015 14:51:39 +0000
Jungseok Lee <jungseoklee85@gmail.com> wrote:
> diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> index 8968bf7..0bc16c4 100644
> --- a/kernel/trace/trace_functions_graph.c
> +++ b/kernel/trace/trace_functions_graph.c
> @@ -716,6 +716,8 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s)
> snprintf(nsecs_str, slen, "%03lu", nsecs_rem);
> trace_seq_printf(s, ".%s", nsecs_str);
> len += strlen(nsecs_str);
> + } else if (len == 7) {
> + len -= 1;
Don't you mean len--;
> }
>
> trace_seq_puts(s, " us ");
I don't care much for an extra branch here. I'm going to go with the
following patch:
-- Steve
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 8968bf720c12..ca98445782ac 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -715,13 +715,13 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s)
snprintf(nsecs_str, slen, "%03lu", nsecs_rem);
trace_seq_printf(s, ".%s", nsecs_str);
- len += strlen(nsecs_str);
+ len += strlen(nsecs_str) + 1;
}
trace_seq_puts(s, " us ");
/* Print remaining spaces to fit the row's width */
- for (i = len; i < 7; i++)
+ for (i = len; i < 8; i++)
trace_seq_putc(s, ' ');
}
next prev parent reply other threads:[~2015-07-17 1:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-11 14:51 [PATCH 0/2] Improve trace output format Jungseok Lee
2015-07-11 14:51 ` [PATCH 1/2] tracing: Fix function graph duration format for 7-digit number Jungseok Lee
2015-07-17 1:44 ` Steven Rostedt [this message]
2015-07-17 16:29 ` Jungseok Lee
2015-07-11 14:51 ` [PATCH 2/2] tracing: Introduce two additional marks for delay Jungseok Lee
2015-07-21 14:56 ` Jungseok Lee
2015-07-21 15:09 ` Steven Rostedt
2015-07-21 15:17 ` Jungseok Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150716214436.741dff47@grimm.local.home \
--to=rostedt@goodmis.org \
--cc=jungseoklee85@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®