作者:fuzhipai | 来源:互联网 | 2017-11-04 11:56
google-perftools这个工具可让开发创建更强大的应用程序,特别是那些用C++模版开发的多线程应用程序,包括TCMalloc,heap-checker,heap-profiler和cpu-profiler。1、安装libunwind(仅64位操作系统需要)cdusrlocalsrcwgethttp:download.savann
google-perftools这个工具可让开发创建更强大的应用程序,特别是那些用C++模版开发的多线程应用程序,包括TCMalloc, heap-checker, heap-profiler 和cpu-profiler。
1、安装libunwind(仅64位操作系统需要)
cd /usr/local/src/
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99.tar.gz
tar zxvf libunwind-0.99.tar.gz
cd libunwind-0.99
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install
2、安装google-perftools
cd /usr/local/src/
wget http://google-perftools.googlecode.com/files/google-perftools-1.7.tar.gz
tar zvxf google-perftools-1.7.tar.gz
cd google-perftools-1.7
./configure
make && make install
echo “/usr/local/lib” > /etc/ld.so.conf.d/usr_local_lib.conf
/sbin/ldconfig