Search code examples
linuxperf

Sorting by self column in perf report


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


Solution

  • 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