利用gperftools 查找热点

 

编译运行

嵌入式端生成采样结果

.prof.x 文件

PC端分析采样结果

gperf tools

安装 sudo apt-get install perl graphviz ghostscript gv

生成函数调用关系图cpu.pdf

https://www.cnblogs.com/caosiyang/archive/2013/01/25/2876244.html

从函数调用关系图里面找到样本比例占用较高的函数

参考文献

https://zhuanlan.zhihu.com/p/343231398?utm_source=ZHShareTargetIDMore&utm_medium=social&utm_oi=1022619091906961408

https://www.cnblogs.com/caosiyang/archive/2013/01/25/2876244.html

http://bitjoy.net/2017/02/07/gperftools-tutorial/

https://gperftools.github.io/gperftools/cpuprofile.html

https://wiki.geany.org/howtos/profiling/gperftools

https://gperftools.github.io/gperftools/heapprofile.html