[lworld] RFR: 8304168: [lworld] CDS tests fail with --enable-preview patched value classes [v2]
Ioi Lam
iklam at openjdk.org
Wed Mar 27 17:11:55 UTC 2024
On Wed, 27 Mar 2024 15:46:48 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fixed typo
>
> src/hotspot/share/cds/cdsConfig.cpp line 51:
>
>> 49: bool CDSConfig::is_dumping_heap() {
>> 50: if (is_valhalla_preview()) {
>> 51: // Not working yet -- e.g., HeapShared::ooo_hash() needs to be implemented for value oops
>
> HeapShared::ooo_hash() -> HeapShared::oop_hash()
Fixed.
> src/hotspot/share/cds/filemap.cpp line 2474:
>
>> 2472: }
>> 2473: }
>> 2474:
>
> Another VM option, `InlineFieldMaxFlatSize`, can influence the field layout, and by consequence, the validity of the `InstanceKlass` from the archive. It is probably needed to encode the value of `InlineFieldMaxFlatSize` in the archive to be able to check against the current VM options. We can decide to completely reject the archive if `InlineFieldMaxFlatSize` options don't match, or we can have a per class approach, as most classes won't have flat fields, and only reject classes with a field layout not compliant with the current flag value.
We have such a check already (see [JDK-8272290](https://bugs.openjdk.org/browse/JDK-8272290)]. We currently reject the whole archive when the following flags don't match:
- EnableValhalla
- FlatArrayElementMaxOops
- FlatArrayElementMaxSize
- InlineFieldMaxFlatSize
- InlineTypePassFieldsAsArgs
- InlineTypeReturnedAsFields
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1063#discussion_r1541510977
PR Review Comment: https://git.openjdk.org/valhalla/pull/1063#discussion_r1541511007
More information about the valhalla-dev
mailing list