Make callgrind show all function calls in the kcachegrind callgraph

user1801733 picture user1801733 · Nov 18, 2015 · Viewed 7.7k times · Source

I was using valgrind tool - callgrind and kcachegrind for profiling a large project and was wondering if there is a way that callgrind reports the stats from all the functions (not just the most expensive functions).

To be specific - When I visualized the callgraph in kcachegrind, it included only those functions that are quite expensive, but I was wondering if there is a way to include all the functions from the project in the callgraph. Command used for generating profiling info is given below :

valgrind --dsymutil=yes --tool=callgrind $EXE 

I am not sure if I have to give any options to valgrind or may be compile the application at a different optimization. This might be something trivial but I couldn't find a solution. Any pointers regarding this highly appreciated.

Thanks !

Answer

Eddie Staniloiu picture Eddie Staniloiu · Feb 25, 2016

The command I am using is valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes $EXE and as far as I have seen it includes all the functions in the call graph.

Hope it helps.