Ok, I've found the way. The generated callgrind.out
file you can convert to dot
file using gprof2dotgprof2dot (yes, this tool can parse callgrind
files as well). And then you can get the graph image using dot -T<type> dotfile.dot -o graphfile.<type>