Visualize function calls with Graphviz (Source code by M. Tim Jones)
By utilizing the gcc compiler option -finstrument-functions a dynamic function address trace can be recorded. The pvtrace utility provide by this project converts that record into a dot graph that can then be visualised.
An article containing full details of this procedure and how it works behind the scenes was written by the pvtrace source code author M. Tim Jones. This article was available on IBMs developer works website in 2005 and a pdf version can be found in this repository.
After downloading the source code use make to create the pvtrace executable.
The process for creating the call trace graph of your application is as follows:
gcc -g -finstrument-functions instrument.c all-your-apps-source-files.c -o exename
./exename
pvtrace exename
dot -Tjpg graph.dot -o graph.jpg