0

I collected a performance profile of an application with perf record -g.

By default, perf report displays call chain data:

   100.00%     0.00%  htop     htop                [.] main
            |
            ---main
               |          
                --99.96%--ScreenManager_run
                          |          
                          |--98.98%--ProcessList_scan

Is that possible to produce Linux perf report as if I did not specify -g at the time of recording?

I.e., I would like my report look like this:

36.26%  htop     [kernel.kallsyms]   [k] __d_lookup
 5.65%  htop     [kernel.kallsyms]   [k] __d_lookup_rcu
 3.41%  htop     [kernel.kallsyms]   [k] pid_revalidate
 2.68%  htop     [kernel.kallsyms]   [k] _raw_spin_lock
1

The recent versions of Linux perf allow to specify none as a "type" of a call chain. So, in order to achieve what you need, you should run perf report as follows:

perf report -g none --no-children ...

Note, that the documentation (man perf report) might not mention this option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.