Callgrind is a Valgrind tool for profiling programs. The collected data consists of the number of instructions executed on a run, their relationship to source lines, and call relationship among functions together with call counts. Optionally, a cache simulator (similar to cachegrind) can produce further information about the memory access behavior of the application.
The result is that the files that are produces contain a plethora of data just waiting to be mined. I have written a tool called callgrind_info to extract information out of a callgrind file.
When you want to watch a function for performance regressions callgrind excels at getting results that are similar one run to the next. Extracting the cost of a function in a nightly script would be a very useful thing to do to automatically determine if you are having performance regressions:
./callgrind_info callgrind.out.5511 -cost 'tst_QListView::cursorMove()'
The matching functionality for the "-cost" is the "-function" which will output every function that was used in some specific file:
./callgrind_info callgrind.out.5511 -functions tst_qlistview.cpp
callgrind_info also lets you extract a list of the different specification types.
If you want to know every object/library that was loaded during the run of the program:
./callgrind_info callgrind.out.5511 -spec ob
./callgrind_info callgrind.out.5511 -spec fl | more
./callgrind_info callgrind.out.5511 -spec fn | more
QBasicAtomicInt::operator int() const
The callgrind info tool just touches on some of the data that can be extracted, but already it has proved to be very useful.
The source for callgrind_info can be found in my callgrind tools git repository.