views:

64

answers:

1

I am trying to optimise the boot-up time of linux on an embedded device (not PC)

Currently to profile the boot-up sequence,
I have enabled the timing info on printk logs.

Is this the most optimum way?
If not, how do i profile the boot-up sequence (with timing) with minimum overhead?

PS:
I have a terminal (of the device) over a serial-connection &
I use TeraTerm over windows-XP to access it.

+1  A: 

The overhead of printk timing info is very small. However, this information is not always useful, because it does not tell you what is happening in the userspace.

You might want to try Bootchart. It is a shell script that runs in the background during boot and collects data from /proc. Although it has a larger overhead than printk timing info, it is more detailed and allows you to profile process startup and disk utilization.

http://www.bootchart.org/

Krzysztof Kosiński
@ Krzysztof I did try Bootchartd. But, it just gives me the timing of start-end of processes etc. How do i time a specific "part of code"... Any other tools u know of??...
CVS-2600Hertz
You can try profiling the usual way: compile with -pg, then use gprof on the output. However, the overhead is quite substantial.
Krzysztof Kosiński