RFR: 8265705: aarch64: KlassDecodeMovk mode broken

Thomas Stuefe stuefe at openjdk.java.net
Fri May 14 18:07:37 UTC 2021


On Tue, 11 May 2021 07:49:35 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Hi,
> 
> may I please have a review for this aarch64-specific fix? Details see JBS issue and code comment.
> 
> I manually tested that this fix works. Patch includes a repro case.
> 
> Cheers, Thomas

Hi Ioi,

thank you for looking at this.

> Since we already have an assert to check that the range is less than 4G, can’t we set shift to zero for all platforms? BTW the assert should be changed to a guarantee so it works for product build as well.
> 
> In the future, if we want to both CDS and >4G CCS, we can revisit this.

I thought about this, but wanted to limit the patch to aarch64. We are closing in on JDK-17 code freeze and I am snowed in, I don't really want to change Klass pointer encoding now for all platforms.

Another reason is that as long as we have a shift, I am happy to have platforms which have shift>0 by default; if we set shift to 0 for all platforms on CDS, we don't have any meaningful code paths with shift >0 and it may bitrot.

If we decide to just do away with the shift altogether, ignoring the potential benefits for Lilliput, then we can do this. And if we manage to make this coding CDS agnostic, this branch will go away and we will do what the CDS=off path does today: use base==0 for pointers < 32g.

Cheers, Thomas

-------------

PR: https://git.openjdk.java.net/jdk/pull/3968


More information about the hotspot-runtime-dev mailing list