[master] RFR: JDK-8324523: Lilliput: if +UseCOH, always use the archive's encoding base and shift
Roman Kennke
rkennke at openjdk.org
Tue Jan 23 15:41:08 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.
Change looks ok.
Questions, though: what is the impact of this? Is it a bug? Does it improve or regress performance? Should it be backported?
-------------
Marked as reviewed by rkennke (Lead).
PR Review: https://git.openjdk.org/lilliput/pull/124#pullrequestreview-1839123144
More information about the lilliput-dev
mailing list