1、使用valgrind检测内存泄漏、内存读写出错等信息,但会使程序性能下降,须带-g调试信息,须安装使用,官网使用向导:
http://valgrind.org/docs/manual/quick-start.html#quick-start.intro
2、使用gperftools检测函数占用cpu时间及比例,不带-g,须安装使用,下载地址:(还须安装libunwind)
https://github.com/gperftools/gperftools/releases
使用参照链接:https://my.oschina.net/u/918218/blog/698961
http://blog.csdn.net/jnu_simba/article/details/43113121
4、如何给程序脱衣,使用strip,-g相当于穿上了衣服,strip就相当于脱衣:
http://www.cnblogs.com/baiduboy/p/7061361.html