28

How do I sort by self column in perf report output?

$ 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

Data was callected with

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

Screenshot

Marko Kevac
  • 2,902
  • 30
  • 47

1 Answers1

27

By default, perf receives the --children parameter which creates the "children overhead view". As a consequence, you can switch back to a "self overhead" view by simply specifying the --no-children switch

perf report --no-children

There is a discussion on this topic in the man page man perf-report

Florent Bruneau
  • 1,164
  • 10
  • 6
  • 4
    Only the recent man page has this discussion. My version doesn't event mention --no-children (only --children). The answer is correct, thank you! – Marko Kevac Oct 16 '15 at 15:08
  • Will `--no-children` option work with `perf top -g` command? Fresh man page is at http://man7.org/linux/man-pages/man1/perf-report.1.html and http://man7.org/linux/man-pages/man1/perf-top.1.html – osgx Jun 08 '18 at 16:52