valgrind --tool=callgrind ./test
callgrind_annotate callgrind.out.xxxx (xxxx是代称,使用需要更改为实际的编号)
python gprof2dot.py -f callgrind callgrind.out.xxxx |dot -Tpng -o report.png
最终生成的report.png文件与gprof生成的函数调用图类似。
valgrind --tool=callgrind ./test
callgrind_annotate callgrind.out.xxxx (xxxx是代称,使用需要更改为实际的编号)
python gprof2dot.py -f callgrind callgrind.out.xxxx |dot -Tpng -o report.png
最终生成的report.png文件与gprof生成的函数调用图类似。