[aarch64-port-dev ] Very large code caches

Andrew Haley aph at redhat.com
Wed May 16 07:35:46 UTC 2018


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.
> http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2014-January/000642.html

I changed my mind after that, and we implemented trampolines.

>>> 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.
> Cool!
> 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.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the hotspot-compiler-dev mailing list