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

William Kemper wkemper at openjdk.org
Fri Aug 1 18:42:00 UTC 2025


On Fri, 1 Aug 2025 07:30:40 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`
>>  - [x] Linux x86_64 server fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8364212-shenandoah-archived-objs
>  - Merge branch 'master' into JDK-8364212-shenandoah-archived-objs
>  - Do not fill out the entire regions
>  - Merge branch 'master' into JDK-8364212-shenandoah-archived-objs
>  - A bit more verification
>  - Fix
>  - Fix
>  - Regular CDS

src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1282:

> 1280:       ShenandoahHeapRegion* r = _heap->get_region(i);
> 1281:       if (r->free() < PLAB::min_size() * HeapWordSize) {
> 1282:         _partitions.retire_from_partition(ShenandoahFreeSetPartitionId::Mutator, i, r->used());

Should we accrue waste here when these regions are retired? Or is waste only _humongous_ waste?

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

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


More information about the shenandoah-dev mailing list