Archive for Linux

Bootchart

Your Linux boot very slow? Try bootchart. It is “a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart.”

When developing the Linux based appliance, we always want to squeeze the boot time to give user a better experience (over-engineering? ;)). This tool will shine there.

Leave a Comment

Call graph

Recently reading some kernel code and think a call graph tool should be able to help me. So I tried NCC and CodeVIZ yesterday.

Installation:

* NCC has rpm for Fedora Core 5 but some files in source tgz is missed from rpm.

* CodeVIZ, I do not want to use the patched gcc (that is why I choose NCC). So a simply copy (see README for detail) will finish the installation. NCC site has a nice writeup about how to compile kernel. I tried it on 2.6.19 with one extra hack.

Compliation:

In <2.6.19 ksrc>/include/linux/compiler-gcc4.h, have to comment this line in order to compile ok.
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)

Compile the code I need to read, SCST, is quite straightfoward.

Graph:

First need to get full graph information,

#genfull -g cncc

Then generate what I want

#gengraph –output-type png -f init_scst -t

gengraph has various options can be used to customize the use. One of it is “-i” which can exclude some functions I do not want to see. I have to read the gengraph code to see how to use this option.

#gengraph –output-type png –no-extern -d 20 –output-layout LR -i “__fswab32;list_del;list_add_tail;list_del_init” -f init_scst

See what I get, quite nice right?

init_scst.png

Today Stelios, author of ncc, suggest me to try nccnav more. I will for sure. But thank Stelios for this nice tool first!

Comments (1)

« Newer Posts