All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Bird <tim.bird@am.sony.com>
To: linux-embedded <linux-embedded@vger.kernel.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH]  Add better resolution to initcall_debug timings
Date: Fri, 12 Sep 2008 12:51:45 -0700	[thread overview]
Message-ID: <48CAC851.4020408@am.sony.com> (raw)

Change the time resolution for initcall_debug to microseconds,
from milliseconds.  This is handy to determine which
initcalls you want to work on for faster booting.

One one of my test machines, over 90% of the initcalls are
less than a millisecond and (without this patch) these are
all reported as 0 msecs.  Working on the 900 us ones is more
important than the 4 us ones.

With 'quiet' on the kernel command line, this adds no significant
overhead to kernel boot time.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
---
 init/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index bdc8be0..f441cad 100644
--- a/init/main.c
+++ b/init/main.c
@@ -719,8 +719,8 @@ int do_one_initcall(initcall_t fn)
 		delta = ktime_sub(t1, t0);

 		print_fn_descriptor_symbol("initcall %s", fn);
-		printk(" returned %d after %Ld msecs\n", result,
-			(unsigned long long) delta.tv64 >> 20);
+		printk(" returned %d after %Ld usecs\n", result,
+			(unsigned long long) delta.tv64 >> 10);
 	}

 	msgbuf[0] = 0;
-- 
1.5.6

                 reply	other threads:[~2008-09-12 19:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=48CAC851.4020408@am.sony.com \
    --to=tim.bird@am.sony.com \
    --cc=linux-embedded@vger.kernel.org \
    --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 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.