lkml.org 
[lkml]   [2008]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] fix printk format typo in boot ftracer.
2008/10/4 Arjan van de Ven <arjan@infradead.org>:
> When printing nanoseconds, the right printk format string is %09 not %06...
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
>
> diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
> index a7efe35..d0a5e50 100644
> --- a/kernel/trace/trace_boot.c
> +++ b/kernel/trace/trace_boot.c
> @@ -62,14 +62,14 @@ static enum print_line_t initcall_print_line(struct trace_iterator *iter)
> struct timespec rettime = ktime_to_timespec(it->rettime);
>
> if (entry->type == TRACE_BOOT) {
> - ret = trace_seq_printf(s, "[%5ld.%06ld] calling %s @ %i\n",
> + ret = trace_seq_printf(s, "[%5ld.%09ld] calling %s @ %i\n",
> calltime.tv_sec,
> calltime.tv_nsec,
> it->func, it->caller);
> if (!ret)
> return TRACE_TYPE_PARTIAL_LINE;
>
> - ret = trace_seq_printf(s, "[%5ld.%06ld] initcall %s "
> + ret = trace_seq_printf(s, "[%5ld.%09ld] initcall %s "
> "returned %d after %lld msecs\n",
> rettime.tv_sec,
> rettime.tv_nsec,

I picked these formats from the printk.c time formatting. But you're right,
09 would give us the whole nano precision.


\
 
 \ /
  Last update: 2008-10-04 23:01    [W:0.048 / U:3.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site