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

Thomas Stuefe stuefe at openjdk.java.net
Fri Feb 4 08:28:53 UTC 2022


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.

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

Commit messages:
 - Fix cds LotsOfClasses tests on 32-bit

Changes: https://git.openjdk.java.net/lilliput/pull/38/files
 Webrev: https://webrevs.openjdk.java.net/?repo=lilliput&pr=38&range=00
  Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/lilliput/pull/38.diff
  Fetch: git fetch https://git.openjdk.java.net/lilliput pull/38/head:pull/38

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


More information about the lilliput-dev mailing list