Re: RFR: heapbase register can be allocated in compressed mode
Kuai Wei
kuaiwei.kw at alibaba-inc.com
Fri Apr 10 04:16:30 UTC 2020
Hi Andrew,
Thanks for your review.
As you pointed out, some stubs are generated before universe fully initialized and they will reset r27 in reinit_heap.
My initial think is they are not the problem. Interpreters can be safe because they are initialized after heap. I can change
them not to dependent on fully_initialized flag.
I will check call stubs to guarantee they are safe.
Thanks,
Kuai Wei
------------------------------------------------------------------
From:Andrew Haley <aph at redhat.com>
Send Time:2020年4月10日(星期五) 01:01
To:蒯微(麦庶) <kuaiwei.kw at alibaba-inc.com>; hotspot compiler <hotspot-compiler-dev at openjdk.java.net>
Subject:Re: RFR: heapbase register can be allocated in compressed mode
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