RFR: 8273508: Support archived heap objects in SerialGC [v2]

Calvin Cheung ccheung at openjdk.java.net
Mon Sep 27 18:10:31 UTC 2021


On Tue, 21 Sep 2021 17:35:13 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> When `-XX:+UseSerialGC is enabled`, load the CDS archived heap objects into `SerialHeap::old_gen()` during VM bootstrap. This improves VM start-up time, mostly because the module graph can be loaded from the archive.
>> 
>> 
>> $ perf stat -r 40 java -XX:+UseSerialGC -version
>> 
>> Before: 0.042484507 seconds time elapsed ( +- 0.72% )
>> After:  0.031671000 seconds time elapsed ( +- 0.72% )
>> 
>> 
>> Changes in the gc subdirectories are contributed by @tschatzl
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   @tschatzl comments

I've reviewed the CDS related changes. Just one minor comment below.

src/hotspot/share/cds/heapShared.cpp line 1762:

> 1760:   if (_loaded_heap_bottom != 0) {
> 1761:     HeapWord* bottom = (HeapWord*)_loaded_heap_bottom;
> 1762:     HeapWord* top = (HeapWord*)_loaded_heap_top;

Maybe add `assert(_loaded_heap_top != 0, “must be”)` ?

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

Marked as reviewed by ccheung (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5596


More information about the hotspot-dev mailing list