跳转至

性能分析

https://www.brendangregg.com/offcpuanalysis.html https://github.com/eunomia-bpf/bpf-developer-tutorial

Benchmark

https://developer.aliyun.com/article/940173 https://quick-bench.com/q/Sx_qfU0dqS1GFqx16v1j36voouM

Perf 火焰图

https://www.cnblogs.com/happyliu/p/6142929.html

Text Only
1
2
3
4
5
sudo perf record -F 99 -p PID -g -- sleep 60
-F 99: 每秒采样99次
-p PID: 指定进程id
-g: 记录调用栈
sleep 60: 持续60秒, 如果不加则一直采样到手动中断(CRTL+C)为止
查看perf.data文件:

  • Hotspot工具

https://github.com/KDAB/hotspot

  • firefox profiler

https://profiler.firefox.com profile工具:https://nnethercote.github.io/perf-book/profiling.html