安装google perftools

最近要看一下一个程序的性能,计划用google perftools测试一下.下面是我安装的过程一个流水说明,没有含量,我就是看着耍.在git上https://github.com/gperftools/gperftools下载下来,我这里版本是gperftools-2.5.tar.gz,解压后进入目前,看INSTLL,发现这里有一段话:

*** NOTE FOR 64-BIT LINUX SYSTEMS

The glibc built-in stack-unwinder on 64-bit systems has some problems
with the perftools libraries.  (In particular, the cpu/heap profiler
may be in the middle of malloc, holding some malloc-related locks when
they invoke the stack unwinder.  The built-in stack unwinder may call
malloc recursively, which may require the thread to acquire a lock it
already holds: deadlock.)

For that reason, if you use a 64-bit system, we strongly recommend you
install libunwind before trying to configure or install gperftools.

明显啊,要安装 libunwind.这个好办

lhw@lhw:~/projects/gperftools-2.5$ sudo apt-cache search libunwind

android-libunwind - libunwind for Android
android-libunwind-dev - libunwind for Android - Development files
libunwind-dev - library to determine the call-chain of a program - development
libunwind-setjmp0 - libunwind-based non local goto - runtime
libunwind-setjmp0-dbg - libunwind-based non local goto - runtime
libunwind-setjmp0-dev - libunwind-based non local goto - development
libunwind8 - library to determine the call-chain of a program - runtime
libunwind8-dbg - library to determine the call-chain of a program - runtime
libunwind8-dev - library to determine the call-chain of a program - development
直接安装

 sudo apt-get install libunwind-dev

很有可能直接安装libunwind8就可以了,不用安装开发者版本的.但我也觉得多安点还好,不洁癖,装上也不大,直接装了.

然后就

.configure
make
sudo make install


然后就搞定了.



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值