public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Arjan van de Ven <arjan@infradead.org>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] fix printk format typo in boot ftracer.
Date: Sun, 5 Oct 2008 11:51:34 +0200	[thread overview]
Message-ID: <20081005095134.GC29909@elte.hu> (raw)
In-Reply-To: <20081004172449.58e53afd@infradead.org>


* 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

  reply	other threads:[~2008-10-05  9:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-04 20:42 [patch] fix printk format typo in boot ftracer Arjan van de Ven
2008-10-04 20:58 ` Frédéric Weisbecker
2008-10-05  0:24   ` Arjan van de Ven
2008-10-05  9:51     ` Ingo Molnar [this message]
2008-10-05 11:36     ` Frédéric Weisbecker

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=20081005095134.GC29909@elte.hu \
    --to=mingo@elte.hu \
    --cc=arjan@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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