I have been using google perf tools successfully on my pc. However, I am compiling and deploying for aarch64 architecture and the profiling results I get for x86 might not match up with aarch64.
I wanted to directly measure things on the aarch64 device. I compiled with RelWithDebInfo
flag, I ran my code with run-time linking of profiler LD_PRELOAD
.
For my first try, mostly I got addresses instead of function names:
828 2.1% 86.0% 828 2.1% 0x0000007fa4ededb8
827 2.1% 88.1% 827 2.1% 0x0000007fa4edcf5c
641 1.6% 89.8% 641 1.6% 0x0000007fa4edcf6c
600 1.5% 91.3% 600 1.5% 0x0000007fa4ededc4
413 1.1% 92.4% 413 1.1% 0x0000007fa4edec5c
I got the real function names for some of the functions though.
LD_PRELOAD
option is not recommended. On my x86 pc, I tried to link with -lprofiler
option after compiling google performance tools doing:
./configure --prefix [AARCH64_LIBPATH] --host aarch64-gnu-linux
make && sudo make install
When I tried to make
my code I got the following error:
skipping incompatible [AARCH64_LIBPATH]/libprofiler.so when searching for -lprofiler
[SOME_AARCH64_PATH]/ld: cannot find -lprofiler
How can I profile CPU on aarch64 device with google perf tools?
This seems like debug info issue. Perhaps if you can provide small test program and exact details of how you run it, I will be able to help.