lkml.org 
[lkml]   [2008]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] fix printk format typo in boot ftracer.

* Arjan van de Ven <arjan@infradead.org> wrote:

> On Sat, 4 Oct 2008 22:58:12 +0200
> "Frédéric Weisbecker" <fweisbec@gmail.com> wrote:
>
> > > - 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.
>
> it's more than precision, it's correctness.
>
> doing "0.%02i" will do
> 0.100 if you pass it 100 and
> 0.10 if you pass it 10
>
> and most off the time, except the first 0.1 seconds, you'll be passing
> it 9 digits, but the first 0.1 seconds.. the %06 will just give really
> incorrect results.

applied to tip/tracing/core, thanks!

Ingo
--
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/

\
 
 \ /
  Last update: 2008-10-05 11:55    [W:0.047 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site