-
Notifications
You must be signed in to change notification settings - Fork 937
Closed
Labels
Description
Describe the bug
Spotted on Alpine while testing --ttsp:
$ objdump -tR /usr/lib/jvm/java-11-amazon-corretto/lib/server/libjvm.so | grep SafepointSynchronize | grep begin
0000000000287338 l F .text 0000000000000002 _ZN20SafepointSynchronize5beginEv.cold
0000000000ceaa60 l F .text 0000000000003365 _ZN20SafepointSynchronize5beginEv
...Profiler::resolveSymbols tries resolving SafepointSynchronize::begin, which is mangled to _ZN20SafepointSynchronize5beginE*, which is then resolved to _ZN20SafepointSynchronize5beginEv.cold. The patching then stops, and the other matching symbol is ignored altogether.
_ZN20SafepointSynchronize5beginEv.cold is some fallback version of SafepointSynchronize::begin:
(gdb) disass _entry
Dump of assembler code for function _ZN20SafepointSynchronize5beginEv.cold:
0x00007ffff6eac338 <+0>: ud2Thus, patching it does not achieve the intended behavior of --begin.
This does not happen on e.g. amazonlinux:
$ objdump -tR ./java-17-amazon-corretto.x86_64/lib/server/libjvm.so | grep SafepointSynchronize | grep begin
0000000000cb5150 l F .text 000000000000084c _ZN20SafepointSynchronize5beginEvThanks @krk for the debugging support.
Async-profiler version
master