[aarch64-port-dev ] RFR(M): 8233743: AArch64: Make r27 conditionally allocatable
Nick Gasson
nick.gasson at arm.com
Tue Nov 26 09:25:03 UTC 2019
Hi Andrew,
>
> I see
>
> if (use_XOR_for_compressed_class_base) {
> if (CompressedKlassPointers::shift() != 0) {
> eor(dst, src, (uint64_t)CompressedKlassPointers::base());
> lsr(dst, dst, LogKlassAlignmentInBytes);
> } else {
> eor(dst, src, (uint64_t)CompressedKlassPointers::base());
> }
> return;
> }
>
> if (((uint64_t)CompressedKlassPointers::base() & 0xffffffff) == 0
> && CompressedKlassPointers::shift() == 0) {
> movw(dst, src);
> return;
> }
>
> ... followed by code which does use r27.
>
> Do you ever see r27 being used? If so, I'd be interested to know how
> this gets triggered and what command-line arguments you use. It's
> rather inefficient.
>
Oddly enough the test case runtime/memory/ReadFromNoaccessArea.java now
hits this. I see:
CompressedKlassPointers::base() => 0xffff0b4b5000
CompressedKlassPointers::shift() => 3
The itable stub calls MacroAssembler::load_klass() twice which then
calls the above decode_klass_not_null() with dst==src if
UseCompressedClassPointers is true. So we do the saving/restoring
rheapbase dance twice which blows up the size of the itable stub beyond
the estimated 152B max size.
The key is that this test passes -XX:HeapBaseMinAddress=33G. That in
conjunction with the recent changes to where the CDS archive is loaded
hits this code path (I don't see this with -Xshare:off).
Thanks,
Nick
More information about the hotspot-compiler-dev
mailing list