安装和使用Google perftools

来源:互联网 发布:数控精雕机编程 编辑:程序博客网 时间:2024/06/05 00:59

      最近需要优化内存分配的效率和速度, 加上Nginx的使用, 所以选择了Google Perftools这个工具. 现在把安装过程详细列出来:

1. 由于google被墙, 所以选择用git下载源码:

git clone https://github.com/gperftools/gperftools


2. 进入gperftools目录:

cd gperftools


3. 需要安装必要的包 automake, autoconf, libtool和libunwind

查找libunwind

yum search libunwind

然后选择libunwind-dev相同或相似的开发者包


4. 查阅INSTALL, 里面有这么一段

But, in order to build gperftools checked out from subversionrepository you need to have autoconf, automake and libtoolinstalled. And before running ./configure you have to generate it (anda bunch of other files) by running ./autogen.sh script. That scriptwill take care of calling correct autotools programs in correct order.

所以,我们需要先运行 ./autogen 来生成 ./configure


4. 接下来就是传统的Linux安装三板斧:

./configure

make

make install


(配置和使用更新中)

0 0