google-perftools工具定位内存泄漏

google-perftools工具

Centos7安装

[root@locahost]# cat /etc/centos-release
CentOS Linux release 7.4.1708

#安装unwind
[root@locahost]# wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99.tar.gz
[root@locahost]# tar -zxvf libunwind-0.99.tar.gz
[root@locahost]# cd libunwind-0.99
[root@locahost]# ./configure
[root@locahost]# make 
[root@locahost]# make install

#卸载系统自带的gperftools-libs
[root@locahost]# rpm -ivh gperftools-libs-2.6.1-1.el7.x86_64.rpm
Preparing...     ######################[100%]
	file /usr/lib64/libprofiler.so.0 from install of gperftools-libs-2.6.1-1.el7.x86_64 conflicts with from gperftools-libs-2.4.8-1.el7.x86_64
	file /usr/lib64/libtcmalloc.so.4 from install of gperftools-libs-2.6.1-1.el7.x86_64 conflicts with from gperftools-libs-2.4.8-1.el7.x86_64
	file /usr/lib64/libtcmalloc_and_profiler from install of gperftools-libs-2.6.1-1.el7.x86_64 conflicts with from gperftools-libs-2.4.8-1.el7.x86_64
	file /usr/lib64/libtcmalloc_debug.so.4 from install of gperftools-libs-2.6.1-1.el7.x86_64 conflicts with from gperftools-libs-2.4.8-1.el7.x86_64
	file /usr/lib64/libtcmalloc_minimal.so.4 from install of gperftools-libs-2.6.1-1.el7.x86_64 conflicts with from gperftools-libs-2.4.8-1.el7.x86_64
	file /usr/lib64/libtcmalloc_minimal_debug.so.4 from install of gperftools-libs-2.6.1-1.el7.x86_64 conflicts with from gperftools-libs-2.4.8-1.el7.x86_64

[root@locahost]# rpm -e --nodeps gperftools-libs-2.4.8-1.el7.x86_64

#安装系统自带的gperftools-libs	
[root@locahost]# rpm -ivh gperftools-libs-2.6.1-1.el7.x86_64.rpm
[root@locahost]# rpm -ivh gperftools-devel-2.6.1-1.el7.x86_64.rpm


#安装pprof工具
[root@locahost]# rpm -ivh 	libXaw-1.0.13-4.el7.x86_64.rpm
[root@locahost]# rpm -ivh 	graphviz-2.3

你可能感兴趣的:(调试,内存泄漏)