[lworld] RFR: 8309357: [lworld] CDS is broken with InlineKlasses after the merge
Frederic Parain
fparain at openjdk.org
Mon Jul 10 15:20:25 UTC 2023
On Sat, 8 Jul 2023 07:03:08 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Fix the restoration of the internal pointer to the inlineklass_fixed_block when an InlineKlass is loaded from a CDS archive.
>> Fix the setting of the new calling convention flags when the constMethod object is shared through CDS.
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 3177:
>
>> 3175: if (ces.has_scalarized_args()) {
>> 3176: if (!method->has_scalarized_args()) {
>> 3177: assert(!method()->constMethod()->is_shared(), "Cannot update shared const object");
>
> Is this assertion mandatory ? since shared archives are mapped with MAP_PRIVATE flag [ (on linux)](https://github.com/openjdk/valhalla/blob/lworld/src/hotspot/os/linux/os_linux.cpp#L3418) thus it follow COW semantics, any update to shared mapped region will clone the physical frame before update.
Shared archives are split in two regions. The writable part is using the COW semantic, but all the "const*" metadata are in an unique read-only region.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/883#discussion_r1258424591
More information about the valhalla-dev
mailing list