[aarch64-port-dev ] Very large code caches
lesliezhai at llvm.org.cn
Wed May 16 07:41:16 UTC 2018
Thanks for your quick response!
在 2018年05月16日 15:35, Andrew Haley 写道:
> On 05/16/2018 08:27 AM, Leslie Zhai wrote:
>>> 在 2018年05月16日 15:23, Andrew Haley 写道:
>>> On 05/16/2018 03:53 AM, Leslie Zhai wrote:
>>>> Hi HotSpot developers,
>>>> I am trying to implement `patch_verified_entry` for other targets, such
>>>> as riscv, but I found that:
>>>>> but the real problem is that the resulting call
>>>>> site is not MT-safe: it can't be patched atomically. To make that
>>>>> work we'd have to move the destination address into the constant pool.
>>> Where is that comment? I can't find it.
> I changed my mind after that, and we implemented trampolines.
I will learn it, thanks for your teaching!
>>>> So aarch64 hasn't implemented patched *atomically* yet?
>>> We atomically patch everything correctly. If you look at the AArch64
>>> implementation of patch_verified_entry you'll see that we replace a
>>> direct call instruction if it can reach, and if it can't we jump to a
>>> trampoline. The trampoline is a load from a single word followed by
>>> an indirect call. In both cases it is atomic.
>> And could you share your experience to use PRINT_REG alike or something
>> else to catch the bugs for logical issue?
> I don't really understand that message. There are problems with the lines
> being broken, and the output is combined with PrintCompilation messages.
> I don't think I've used PRINT_REG. If I've had problems with code
> generation I've usually stepped through in the debugger.
hhh, it often costs me several days to debug a stupid bug to find the
*WHERE*, but only several seconds to modify the code :P
More information about the hotspot-compiler-dev