RFR: heapbase register can be allocated in compressed mode
Andrew Haley
aph at redhat.com
Thu Apr 9 17:00:38 UTC 2020
Hi,
On 4/9/20 12:58 PM, Kuai Wei wrote:
> I made an enhancement for aarch64 platform. It's based on great work of https://bugs.openjdk.java.net/browse/JDK-8233743
> and .
>
> In compressed oops mode , if heapbase is zero, jvm don't use heapbase register to encode/decode. So it can be allocated by
> JIT compiler.
>
> The webrev is:
> http://cr.openjdk.java.net/~wzhuo/8242449/webrev.00/
>
> The bug link:
> https://bugs.openjdk.java.net/browse/JDK-8242449
That looks safe. I think the only reason we never did something like
that before was because no-one felt brave enough, but perhaps we
should do it now.
MacroAssembler::reinit_heapbase() points to a potential problem,
though: we generate some of this code before we know what the heapbase
is going to be, so we unconditionally write to rheapbase. I think this
only happens in three places: generate_call_stub,
interpreter::generate_throw_exception, and
interpreter::generate_native_entry, so we should be safe.
It's tricky to test this stuff, though. OK for mainline, and let's
test it as much as we can. Thanks.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-compiler-dev
mailing list