gperftools-2.5.93
来源:互联网 发布:yy免费头像源码和制作 编辑:程序博客网 时间:2024/06/06 21:29
https://github.com/gperftools/gperftools
https://gperftools.github.io/gperftools/cpuprofile.html
yum install libunwind
yum install libunwind-devel
yum install graphviz
编译时 -lprofiler 运行找不到 profiler 时,export LD_LIBRARY_PATH=/usr/local/lib/ 默认装这下面
Running the Code
There are several alternatives to actually turn on CPU profiling for a given run of an executable:
Define the environment variable CPUPROFILE to the filename to dump the profile to. For instance, if you had a version of
/bin/ls
that had been linked against libprofiler, you could run:% env CPUPROFILE=ls.prof /bin/ls
In addition to defining the environment variable CPUPROFILE you can also define CPUPROFILESIGNAL. This allows profiling to be controlled via the signal number that you specify. The signal number must be unused by the program under normal operation. Internally it acts as a switch, triggered by the signal, which is off by default. For instance, if you had a copy of
/bin/chrome
that had been been linked against libprofiler, you could run:% env CPUPROFILE=chrome.prof CPUPROFILESIGNAL=12 /bin/chrome &
You can then trigger profiling to start:
% killall -12 chrome
Then after a period of time you can tell it to stop which will generate the profile:
% killall -12 chrome
In your code, bracket the code you want profiled in calls to
ProfilerStart()
andProfilerStop()
. (These functions are declared in<gperftools/profiler.h>
.)ProfilerStart()
will take the profile-filename as an argument.
分析:
pprof ./demo my.prof > profile.txt
pprof --text ./demo my.prof > profile.txt
pprof --pdf ./demo my.prof > profile.pdf
- gperftools-2.5.93
- gperftools
- gperftools
- gperftools使用
- 关于gperftools
- 关于gperftools
- gperftools + qcachegrind
- gperftools使用说明
- gperftools使用
- 关于gperftools
- gperftools使用方法和常见问题
- gperftools -- heapcheck 使用
- 性能工具gperftools使用说明
- gperftools 移植到arm
- gperftools heap check使用
- gperftools的pprof安装
- gperftools编译与使用
- gperftools工具的使用
- 金蝶EAS,编码、身份证号等特定字段要求全局唯一,代码片段
- IPMI 通过中断和timer 两种机制处理发送给bmc的命令
- 2017015
- VMware 网络配置(NAT)
- TCP/IP 1.概述
- gperftools-2.5.93
- 静态代码块在类被初始化时加载
- git提交node-modules报文件名过长无法提交问题
- 二叉搜索树的第k个节点(java版)
- 设备 eno16777736 似乎不存在, 延迟初始化操作
- Simple-Spring-Memcached(SSM) 的简单使用
- Flask中图片的刷新
- Clion打开新项目时Building symbols时间过长解决方案
- java 并发编程之volatile关键字