From: Arjan van de Ven <arjan@infradead.org>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [patch] fix printk format typo in boot ftracer.
Date: Sat, 4 Oct 2008 17:24:49 -0700 [thread overview]
Message-ID: <20081004172449.58e53afd@infradead.org> (raw)
In-Reply-To: <c62985530810041358p1cc361b1te89894cedcd7e3b3@mail.gmail.com>
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.
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
next prev parent reply other threads:[~2008-10-05 0:25 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 [this message]
2008-10-05 9:51 ` Ingo Molnar
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=20081004172449.58e53afd@infradead.org \
--to=arjan@infradead.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.