Skip to contentSkip to conversation

fastboot: Add a script to visualize the kernel boot process / time

PATCH In review Arjan van de Ven 3 participants 6 messages Sep 13, 2008 – Oct 2, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fastboot: Add a script to visualize the kernel boot process / time

From: Arjan van de Ven <[email protected]>
Subject: [PATCH] fastboot: Add a script to visualize the kernel boot process / time

When optimizing the kernel boot time, it's very valuable to visualize what is going on at which time. In addition, with the fastboot asynchronous initcall level, it's very valuable to see which initcall gets run where and when.

This patch adds a script to turn a dmesg into a SVG graph (that can be shown with tools such as InkScape, Gimp or Firefox) and a small change to the initcall code to print the PID of the thread calling the initcall (so that the script can work out the parallelism).

---
 init/main.c          |    3 +-
 scripts/bootgraph.pl |  132 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 134 insertions(+), 1 deletions(-)
 create mode 100644 scripts/bootgraph.pl
init/main.c +2 -1
index 73785a4..d74757c 100644
@@ -702,7 +702,8 @@ int do_one_initcall(initcall_t fn)
 	int result;
 
 	if (initcall_debug) {
-		print_fn_descriptor_symbol("calling  %s\n", fn);
+		print_fn_descriptor_symbol("calling  %s", fn);
+		printk(" @ %i\n",  task_pid_nr(current));
 		t0 = ktime_get();
 	}
 
scripts/bootgraph.pl new file +132 -0

132 lines not on this page · raw message

Signature · 8 lines
1.5.5.1



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#1 lore raw
Quoted 2 lines · Arjan van de Ven

From: Arjan van de Ven <[email protected]>
Subject: [PATCH] fastboot: Add a script to visualize the kernel boot process / time

applied to tip/fastboot - thanks Arjan.

Ingo

#3 lore raw
Quoted 7 lines · On Mon, 15 Sep 2008 13:59:49 +0100 Pádraig Brady <[email protected]> wrote:
Quoted 4 lines · Arjan van de Ven

From: Arjan van de Ven <[email protected]>
Subject: [PATCH] fastboot: Add a script to visualize the kernel boot process / time

Have you example output anywhere?

eh sure

http://www.fenrus.org/before.svg
http://www.fenrus.org/after.svg

(before and after another patch ;-)

Signature · 3 lines
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#4 lore raw
Quoted 7 lines · Arjan van de Ven
Quoted 4 lines · On Mon, 15 Sep 2008 13:59:49 +0100 Pádraig Brady <[email protected]> wrote:
Quoted 3 lines · Arjan van de Ven

From: Arjan van de Ven <[email protected]>
Subject: [PATCH] fastboot: Add a script to visualize the kernel boot process / time

Quoted 8 lines
Quoted 1 line

Have you example output anywhere?

eh sure

http://www.fenrus.org/before.svg
http://www.fenrus.org/after.svg

(before and after another patch ;-)

Nice times :)
I guess we'll hear more about this on Thursday morning:
http://linuxplumbersconf.org/program/speakers/getspeaker.php?speaker=avandeven.txt

Pádraig.