The Bozo Profiler

What it can do for you

This profiler can be used to get a dump of the runtime call graph of any program for which you have the source code. It requires a complete recompilation of your code and generates a set of binary dump files which represent the program call graph. Right now, this profiler has been successfully used with various applications such as: nautilus, mozilla, open office, eog, and gimp.

These binary dumps can then be converted to human-readable text files. For now, the most interesting output file format you can select is the so-called dot format which can be used as input to the graphviz package to generate nice-looking pdf org png representations of the call graphs.

How do you get the code ?

You can get the code under the GPLv2 from the following mercurial repository: The bandwidth there is a bit limited so, please, be careful.

A tarball is also available from here.

An example use

I did run Nautilus with this profiler and here is a small dump extract of its output in dot format (graphiz) and png (beware, some browsers crash when trying to access this large image so, consider downloading the image rather than view it online).

This rather complex graph can be simplified by grouping function calls by module as shown in this picture. It is possible to add labels which indicate how many times each module called another module. You can also add a logarithmic scale for line widths to reflect the number of times a module calls another module as shown in this image (this image shows what happens if you use a linear scale). For reference, this data was generated from this raw text log file (this is only an extract of the file since the full log file is close to 99MBytes big).

Mathieu Lacage
Last modified: Wed Mar 24 16:48:18 MET 2004