I am running perf record on an older version of the kernel on an ARM board. The kernel version is 3.18.21-rt19
The perf version on the board is similarly perf version 3.18.21.
While I can record and use the report feature on this perf, the TUI for report on this version is quite awful/non-existent. Instead of the expandable sections (in the graph mode) it just shows up as a giant scrollable list of functions that is very tough to work with. Also for some reason my C++ function names are not de-mangled so it is really difficult to read it.
Is it possible to some how either:
Export the perf.data created on this older ARM kernel to an x86 machine running a newer kernel and a newer version of perf and use the perf report on said machine. When I try to do that (I run on kernel 4.4.0-31-generic running perf version 4.4.13) I lose all symbols, even though running perf report on the ARM machine shows the symbols just fine (C++ names are still mangled). I am not sure if this is just because the perf.data format has changed between these kernel versions or if the x86 version is just outright not capable of reading data generated by the ARM machine.
Build a newer perf version (at least the front end) for my older kernel that does the de-mangling and exposes the newer better TUI.
Changing the kernel version on my ARM board is not an option for me.
Advertisement
Answer
Export the perf.data
Exporting of perf.data
should be supported with perf archive
command, check man perf-archive – http://man7.org/linux/man-pages/man1/perf-archive.1.html
perf-archive
– Create archive with object files with build-ids found in perf.data fileperf archive [file]This command runs perf-buildid-list –with-hits, and collects the files with the buildids found so that analysis of perf.data contents can be possible on another machine.
There is no example of using perf archive in the Perf Tutorial: https://perf.wiki.kernel.org/index.php/Tutorial but mentioned in http://events.linuxfoundation.org/sites/events/files/slides/LinuxConJapan2015-DynamicProbes.pdf#page=22 “What’s the Buildid-cache? .. This also allows us to analyse perf.data from remote machine (perf-archive does that)”
It can be hard to use perf with another architecture (x86) to ream ARM files, so you probably may try some ARM system emulator (like qemu
/qemu-system-arm
) with some recent ubuntu/arm or linaro/arm iso or root image (they should have full-featured perf
).
You may also try to upload better version of perf utility (built by you or copied from ubuntu or linaro) to your board – perf user-space tool is compatible with perf_events kernel interface over wide range of kernel versions, and it can read perf.data
recorded with different version of perf tool.