From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755081AbYJEAZL (ORCPT ); Sat, 4 Oct 2008 20:25:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753543AbYJEAY7 (ORCPT ); Sat, 4 Oct 2008 20:24:59 -0400 Received: from casper.infradead.org ([85.118.1.10]:51523 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047AbYJEAY6 convert rfc822-to-8bit (ORCPT ); Sat, 4 Oct 2008 20:24:58 -0400 Date: Sat, 4 Oct 2008 17:24:49 -0700 From: Arjan van de Ven To: "=?UTF-8?B?RnLDqWTDqXJpYw==?= Weisbecker" Cc: mingo@elte.hu, linux-kernel@vger.kernel.org Subject: Re: [patch] fix printk format typo in boot ftracer. Message-ID: <20081004172449.58e53afd@infradead.org> In-Reply-To: References: <20081004134227.465fa20c@infradead.org> Organization: Intel X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 4 Oct 2008 22:58:12 +0200 "Frédéric Weisbecker" 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