Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1186368
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] tracing: Fix function graph duration format for 7-digit number |
| Date | 2015-07-17 03:50 +0200 |
| Message-ID | <pN2WJ-7I8-5@gated-at.bofh.it> (permalink) |
| References | <pL4pY-4oi-11@gated-at.bofh.it> <pL4pY-4oi-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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, ' ');
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] Improve trace output format Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-11 17:00 +0200
[PATCH 1/2] tracing: Fix function graph duration format for 7-digit number Jungseok Lee <jungseoklee85@gmail.com> - 2015-07-11 17:00 +0200
Re: [PATCH 1/2] tracing: Fix function graph duration format for 7-digit number Steven Rostedt <rostedt@goodmis.org> - 2015-07-17 03:50 +0200
csiph-web