[llvm] [BOLT] Add CustomOffset flag for optimizing kernel (PR #98153)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 02:46:24 PDT 2024
lifengxiang1025 wrote:
Kernel and perf version:
````
# os release : 5.14.0
# perf version : 5.14.g7d2a07b76933
````
One line of perf script's output:
````
swapper 0 [038] 179384.938151: 29186224 cycles: ffffffff866497af poll_idle+0x7f (/lib/modules/5.14.0/build/vmlinux)
````
The symbol `poll_idle`'s address matches `/proc/kallsyms`:
````
# cat /proc/kallsyms | grep poll_idle
ffffffff86649730 t poll_idle
````
doesn't match `/lib/modules/5.14.0/build/vmlinux`:
````
# nm /lib/modules/5.14.0/build/vmlinux | grep poll_idle
ffffffff81a49730 t poll_idle
# addr2line -e /lib/modules/5.14.0/build/vmlinux -f ffffffff866497af
??
??:0
````
Make sure this `/lib/modules/5.14.0/build/vmlinux` is sampled by perf:
````
# file /lib/modules/5.14.0/build/vmlinux
/lib/modules/5.14.0/build/vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=29346d1237f67c8b2fdeaa079a2b471bb42de737, not stripped
# /root/linux/tools/perf/perf buildid-list -i perf-5.14.data | grep vmlinux
29346d1237f67c8b2fdeaa079a2b471bb42de737 /lib/modules/5.14.0/build/vmlinux
````
https://github.com/llvm/llvm-project/pull/98153
More information about the llvm-commits
mailing list