摘要:gperftools是Google提供的一套工具,其中的一个功能是CPU profiler,用于分析程序性能,找到程序的性能瓶颈。安装gperftools:http://code.google.com/p/gperftools/downloads/listlibunwind:http://download.savannah.gnu.org/releases/libunwind/64位操作系统需要安装libunwind,官方推荐版本是libunwind-0.99-beta安装过程:./configure [--disable-shared]&& make && m
阅读全文
01 2013 档案
摘要:项目主页:http://clang.llvm.org/安装1.yum/apt-getyum install clangorapt-get install clang2.编译安装所需工具:GCC Python Subversion安装步骤:1.检出源码: LLVM Clang extra-Clang-tools(可选) Compiler-RT2.编译安装:configure && make && make install根据官方文档提供的安装方法,提供一个shell脚本:1.创建一个目录,用于编译安装2.拷贝clang_install.sh至该目录3.进入该目录,
阅读全文
摘要:文件描述符fd是Linux相对有限的资源,单个进程中的fd数量有限制,一般默认是1024。查看当前session的fd数量限制# ulimit -n修改当前session的fd数量限制,注意只对当前session有效# ulimit -n your_need程序中可利用系统函数修改fd限制,只对当前进程有效。#include <sys/resource.h>struct rlimit { rlim_t rlim_cur; // soft limit rlim_t rlim_max; // hard limit };// get resource limitint getrli...
阅读全文