https://github.com/gperftools/gperftools.git
yum install autoconf
yum install automake
yum install libtool
./autogen.sh
./configure
make
make install
gcc gperftest.c -O0 -lprofiler
export LD_LIBRARY_PATH=/usr/local/lib
./a.out
pprof --text a.out MyProfile
yum install graphviz ghostscript -y
pprof --pdf a.out MyProfile > MyProfile.pdf
原文:https://www.cnblogs.com/lodger47/p/14998811.html