valgrind callgrind性能分析

1.请自行安装valgrind工具
2.使用工具运行你的应用程序
   valgrind --tool=callgrind ./sgzj-socialserver
3.运行结束后,程序当前目录生成了一个文件callgrind.out.58237
4. python gprof2dot.py -f callgrind -n20 -s callgrind. out.58237 > valgrind.dot5.dot -Tpng valgrind.dot -o valgrind.png图片结果如下:


以上就是我们如何使用callgrind来对自己程序进行性能分析。

PS:如果需要帮助,请联系微信wangchong-fly