跳至主要内容

博文

目前显示的是 七月, 2021的博文

gperftools pprof无侵入的使用

 编译gperftools,make install 然后设置so的位置 export LD_PRELOAD=/usr/local/lib64/libprofiler.so  最后执行 env CPUPROFILE=test-normal.prof ./testcpp 就有test-normal.prof结果了 剩下的就是 pprof --text testcpp ./test-normal.prof  或者 pprof --dot testcpp ./test-normal.prof  > test.dot 等等