0

perf的常用操作

 1 year ago
source link: https://charon-cheung.github.io/2022/11/16/%E5%B8%B8%E7%94%A8%E5%B7%A5%E5%85%B7/perf%E7%9A%84%E5%B8%B8%E7%94%A8%E6%93%8D%E4%BD%9C/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

perf的常用操作 | 沉默杀手

perf的常用操作
2022-11-16|常用工具|
Word count: 82|Reading time: 1 min

先用ps aux找到进程的PID,再观察进程内各个函数的CPU使用情况:sudo perf top -p <pid>

分析cartographer_node 进程

记录采样结果,以供后续分析,加上-g会记录调用链:sudo perf record -g -p <pid>

在当前终端读取采样结果:sudo perf report,会自动读取perf.data

©2018 - 2022 By Charon Cheung
Driven - Hexo|Theme - Melody

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK