程序不产生gmon.out的原因
2017-03-10 13:29
323 查看
最近想用gprof优化一下程序,奇怪的是怎么也不产生gmon.out文件,在网上查了一些方法,也没有解决,然后在
man gcc中看到一句话:
-pg Generate extra code to write profile information suitable for the
analysis program gprof. You must use this option when compiling
the source files you want data about, and
you must also use it when
linking.
要想产生gmon.out文件,必须在编译和链接时,都加上-pg -g选项。
如果还是没有解决:可以参考一下下面网址:
http://blog.csdn.net/crazyhacking/article/details/11972889
man gcc中看到一句话:
-pg Generate extra code to write profile information suitable for the
analysis program gprof. You must use this option when compiling
the source files you want data about, and
you must also use it when
linking.
要想产生gmon.out文件,必须在编译和链接时,都加上-pg -g选项。
如果还是没有解决:可以参考一下下面网址:
http://blog.csdn.net/crazyhacking/article/details/11972889
相关文章推荐
- PHP程序漏洞产生的原因和防范方法
- PHP程序漏洞产生的原因和防范方法
- 当程序提示数据库语法错误,但怎么查也查不出原因时,检查下你的字段名是否用了会产生冲突的单词
- 程序运行产生SIGABRT信号的原因
- 7.1 :OutOfMemoryError,Java堆溢出了,这表明程序有严重的问题。我们需要找造成OutOfMemoryError原因。一般有两种情况:
- 编译程序出现一个: 可访问性不一致; 产生的原因和解决方法
- StackOverflowError和OutOfMemoryError产生原因汇总
- matlab out of memory产生原因和解决办法
- PHP程序漏洞产生的原因和防范方法
- 王立平--android out of memory(OOM)产生原因
- Linux下运行C++程序产生“段错误”的原因及其解决办法
- PHP程序漏洞产生的原因和防范方法
- Android程序 ANR的产生原因及避免办法
- 王立平--android out of memory(OOM)产生原因
- PHP程序漏洞产生的原因分析与防范方法说明
- PHP程序漏洞产生的原因和防范方法--转
- web程序莫名弹出错误提示框(dwr),处理方法。产生原因有待思考
- 服务器性能分析工具gprof的使用及没有生成gmon.out文件的原因
- 剖析OutOfMemoryError: PermGen space产生原因及解决方法
- 程序运行产生SIGABRT信号的原因