gprof能夠快速的初步確認程序的性能。性能
具體使用簡易版以下code
g++ test.c -o test -pg /*編譯*/ ./test /*執行程序,將生成gmon.out文件*/ gprof -b test gmon.out > log /*將分析信息放入log文件*/