[master] RFR: JDK-8324523: Lilliput: if +UseCOH, always use the archive's encoding base and shift

Thomas Stuefe stuefe at openjdk.org
Tue Jan 23 15:24:31 UTC 2024


We have two ways to initialize narrow Klass encoding: either we let the JVM choose base and shift freely, or we dictate base and shift. The former gives the JVM more leeway, e.g. to go with unscaled encoding. The latter, however, is required if we load a CDS archive and that archive contains precomputed narrow Klass IDs.

In the Legacy VM, this can only happen if the archive contains heap objects. In Lilliput, the markword carries the nKlass, and therefore the prototype baked into archived Klass structures carries it also. Therefore, we must always choose the strict initialization when +UseCOH.

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

Commit messages:
 - JDK-8324523-Lilliput-if-UseCOH-always-use-the-archives-encoding-base-and-shift

Changes: https://git.openjdk.org/lilliput/pull/124/files
 Webrev: https://webrevs.openjdk.org/?repo=lilliput&pr=124&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8324523
  Stats: 18 lines in 1 file changed: 6 ins; 0 del; 12 mod
  Patch: https://git.openjdk.org/lilliput/pull/124.diff
  Fetch: git fetch https://git.openjdk.org/lilliput.git pull/124/head:pull/124

PR: https://git.openjdk.org/lilliput/pull/124


More information about the lilliput-dev mailing list