[aarch64-port-dev ] RFR(M): 8233743: AArch64: Make r27 conditionally allocatable
Andrew Haley
aph at redhat.com
Mon Nov 18 10:06:46 UTC 2019
On 11/18/19 9:58 AM, Pengfei Li (Arm Technology China) wrote:
> I think you're right. I tried hard with various VM options but still failed to
> get the code after this part triggered. The worst case I've ever found is that
> the encoding/decoding returns at if block
> if (((uint64_t)CompressedKlassPointers::base() & 0xffffffff) == 0
> && CompressedKlassPointers::shift() == 0) { ... }
>
> By browsing the code, I found this is caused by a metaspace reservation trick
> that always tries to make AArch64 metaspace 4G-aligned. [1]
>
> If we do have the confidence that r27 won't be used for class pointers, I will
> remove UseCompressedClassPointers in my if condition. Another question, shall
> we clean up the (almost) dead code which uses r27 for encoding/decoding class
> pointers?
>
> [1] http://hg.openjdk.java.net/jdk/jdk/file/7bdc4f073c7f/src/hotspot/share/memory/metaspace.cpp#l1048
We should have a flag which is set if the search for nicely-aligned memory
is successful, and then you can use that flag to determine if r27 is
needed.
--
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 aarch64-port-dev
mailing list