gprof可以快速的初步确认程序的性能。
具体使用简易版如下
g++ test.c -o test -pg /*编译*/
./test /*执行程序,将生成gmon.out文件*/
gprof -b test gmon.out > log /*将分析信息放入log文件*/
gprof可以快速的初步确认程序的性能。
具体使用简易版如下
g++ test.c -o test -pg /*编译*/
./test /*执行程序,将生成gmon.out文件*/
gprof -b test gmon.out > log /*将分析信息放入log文件*/
转载于:https://my.oschina.net/u/572632/blog/360464