RFR: 8364212: Shenandoah: Rework archived objects loading [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Jul 29 19:48:55 UTC 2025


On Tue, 29 Jul 2025 19:03:21 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> As continuation of [JDK-8293650](https://bugs.openjdk.org/browse/JDK-8293650), we would want to avoid allocating CDS archives as humongous regions and then flipping them back to regular state. This already complicates the region accounting significantly, and was a source a few bugs. We can rework the CDS archive load to cleanly ask collector for a contiguous set of regular regions.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah`
>>  - [x] Linux x86_64 server fastdebug, `runtime/cds`
>>  - [x] Linux x86_64 server fastdebug, `runtime/cds` with `-XX:+UseShenandoahGC`
>>  - [ ] Linux x86_64 server fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   A bit more verification

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2791:

> 2789:   // Fill the tail with the filler object.
> 2790:   HeapWord* regions_end = align_up(end, ShenandoahHeapRegion::region_size_bytes());
> 2791:   if (regions_end > end) {

I believe fill_with_dummy_object() assumes regions_end - end >= min_fill_size.  If this is not true, you may need to leave the remnant within this region unfilled.  (We have special handling throughout to deal specially with remnants at ends of regions that are smaller than min_fill_size)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26510#discussion_r2240789847


More information about the hotspot-gc-dev mailing list