按自身列在perf报告中排序

28

我该如何在perf report输出中按self列排序?

$ perf --version
perf version 4.0.8-300.fc22.x86_64

$ uname -a
Linux marko-desktop 4.0.8-300.fc22.x86_64 #1 SMP Fri Jul 10 21:04:56 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

数据是通过收集得到的

$ perf record -g -p $(pidof node)

屏幕截图

1个回答

27

默认情况下,perf 接收 --children 参数,创建 "子进程开销视图"。因此,您只需指定 --no-children 开关即可切换回 "自身开销" 视图。

perf report --no-children

在手册页 man perf-report 中讨论了这个话题。


4
只有最近的 man 手册才有这个讨论。我的版本甚至没有提到 --no-children(只有 --children)。回答是正确的,谢谢! - Marko Kevac
“--no-children”选项是否适用于“perf top -g”命令?新手手册请参见http://man7.org/linux/man-pages/man1/perf-report.1.html和http://man7.org/linux/man-pages/man1/perf-top.1.html。 - osgx

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接