[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:33 UTC 2024


On Tue, 23 Jan 2024 13:21:11 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> 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.

x86 problem unrelated.

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

PR Comment: https://git.openjdk.org/lilliput/pull/124#issuecomment-1906270949


More information about the lilliput-dev mailing list