gprof使用说明

来源:互联网 发布:linux 安装ssh2 编辑:程序博客网 时间:2024/06/02 14:59

http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html
gcc使用 -pg 参数编译程序
gcc -o test test.c -g -pg
编译成功后运行程序,会在当前目录下生成gmon.out文件
./test
使用gprof和gmon.out运行程序
gprof test gmon.out
这时将输出程序的性能信息

原创粉丝点击