Callgrind Tool for Valgrind 3
=============================

Josef Weidendorfer
Josef.Weidendorfer@gmx.de


What is it?
-----------

Callgrind is a profiling tool for user level applications,
generating call graph information of unmodified binaries.
It is based on the runtime instrumentation framework Valgrind.


Installation
------------

See file INSTALL.
Quick guide: first install Valgrind.  Then do:

    ./configure --prefix=/path/to/valgrind/install
    make
    make install

If you get the sources from CVS, run "./autogen.sh" before.

Due to a bug in the Valgrind 3.1.0 build system, doing "make install"
in a Valgrind 3.1.0 build immediately after "./configure" does not
produce a Valgrind installation which you can use to build Callgrind
(libvex.a is not correctly installed, and the Callgrind configure
script will fail).

To work around this, when installing Valgrind, first do "make" before
"make install" (or do "make install" twice).


Usage
-----

A executable to be profiled is run under callgrinds supervision with

	callgrind <executable> <args> ...

At termination, it generates a file with profile data "callgrind.out.<pid>".
The script "callgrind_annotate" produces human readable ASCII files from the
profile information in callgrind.out or cachegrind.out files.

A good KDE frontend for browsing the profile information
is KCachegrind (see http://kcachegrind.sourceforge.net).

For more information, see the files in the doc/ subdirectory.



Happy profiling,
Josef
