[lworld] RFR: 8309357: [lworld] CDS is broken with InlineKlasses after the merge

Jatin Bhateja jbhateja at openjdk.org
Sat Jul 8 07:07:17 UTC 2023


On Fri, 7 Jul 2023 17:57:57 GMT, Frederic Parain <fparain 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.

Patch looks good to me.

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.

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

PR Review: https://git.openjdk.org/valhalla/pull/883#pullrequestreview-1520663647
PR Review Comment: https://git.openjdk.org/valhalla/pull/883#discussion_r1257107264



More information about the valhalla-dev mailing list