RFR: 8293650: Shenandoah: Support archived heap objects [v2]
William Kemper
wkemper at openjdk.org
Tue Aug 13 16:39:50 UTC 2024
On Mon, 5 Aug 2024 17:13:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> This implements CDS Java heap loading for Shenandoah. There are peculiarities with how CDS loads objects: it basically asks for a contiguous block of memory, fills it out, potentially relocating the objects. This gets interesting when a single Shenandoah region cannot contain the entirety of the load. See the implementation for gory details.
>>
>> Current implementation would work well only with Shenandoah heap regions >= 1M, in other words, with the heaps >=2G. It would be better if we trim down the min alignment, thus unblocking smaller heaps. It is not necessary to do so in this PR, so I track that work separately: [JDK-8337828](https://bugs.openjdk.org/browse/JDK-8337828).
>>
>> Additional testing:
>> - [x] New test
>> - [x] Linux AArch64 server fastdebug, `all` with `-XX:+UseShenandoahGC -XX:+ShenandoahVerify`
>> - [x] Same as above, but `MIN_GC_REGION_ALIGNMENT` manually dropped to 256K (mimics [JDK-8337828](https://bugs.openjdk.org/browse/JDK-8337828))
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Move constant to separate class to unbreak Windows builds
Changes requested by wkemper (Committer).
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2540:
> 2538:
> 2539: // If the trailing region is not full, we need to adjust its top.
> 2540: size_t tail = (size % ShenandoahHeapRegion::region_size_words());
Not sure we need this. The free set adjusts top for all humongous regions in the allocation (including the tail): https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L885. What's more, I believe `new_top` is only used during a full GC to sort out `top` once compaction is complete.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20468#pullrequestreview-2236051231
PR Review Comment: https://git.openjdk.org/jdk/pull/20468#discussion_r1715601238
More information about the shenandoah-dev
mailing list