[master] RFR: Fix CDS LotsOfClasses tests on 32-bit

Roman Kennke rkennke at openjdk.java.net
Fri Feb 4 10:42:35 UTC 2022


On Fri, 4 Feb 2022 08:23:30 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> 68fbdb32af390762a01380b277a3ae30f864fdb4 introduced class pointer reduction to 22-bit. Since that change, `CompressedKlassPointers::encode_not_null` validates the given Klass* - checks that it can be properly encoded with 22 bits. That means `CompressedKlassPointers::encode_not_null` should only be called if UseCompressedClassPointers is true (so, only but unconditionally on 64-bit).
> 
> Note that this asserts just puts our nose onto the question of what to do with Klass pointers on 32-bit. If we need to encode them into a smaller type, we need to find a way to do so for 32-bit too. There are several possibilities, ranging from introducing a class space (or class-space-like feature) for 32-bit too, allocating them wherever like today, but with a larger alignment, up to something completely different. But that is out of scope for this tiny fix.

Looks good to me.
Yes, for now, "encoding" Klass* in 32bit is ok. Eventually we're going to need something to encode Klass* in ~22 bits in 32bit builds, too. But not now.
Thanks!

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

Marked as reviewed by rkennke (Lead).

PR: https://git.openjdk.java.net/lilliput/pull/38


More information about the lilliput-dev mailing list