Skip to main content
1 of 2
Jakub Narębski
  • 1.3k
  • 2
  • 18
  • 30

How to analyze profile data from `perf record --a` (system-wide collection)?

I am using perf from linux-2.6.36-gentoo-r4. The /proc/sys/kernel/perf_event_paranoid is set to 0, so there should be no problems from there.

Because long-running application I am profiling sometimes crashes for some indetermined reason (no information as to reason for it stopping working could be found by me), I turned to system-wide profiling with perf events.

The application in question does parallelized numerical calculations, using MPI (Message Passing Interface) for communication. Before running the application (with mpirun) I have started recording system-wide profile data on one of nodes it is run with:

$ perf record -o perf.all.cycles,graph.data -g -e cycles -a &

After I have realized that application crashed, I have killed the perf task.

It had left

$ du -sh perf.all.cycles,graph.data 
14G     perf.all.cycles,graph.data

14GB of data. Unfortunately perf report doesn't support the -a switch.

How can I analyze system-wide profiling data from perf tool?

Jakub Narębski
  • 1.3k
  • 2
  • 18
  • 30