RFR: 8292329: Enable CDS shared heap for zero builds [v2]

Magnus Ihse Bursie ihse at openjdk.org
Wed Aug 24 10:30:42 UTC 2022


On Tue, 23 Aug 2022 16:49:01 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> ZERO uses UseSerialGC by default. When we dump the default CDS archive during the build process, it fails to dump the shared heap (which requires G1GC).
>> 
>> The fix is to force -XX:+UseG1GC when dumping the default CDS archive during the build process.
>> 
>> Speed up:
>> 
>> (Before)
>> $ perf stat -r 40 ./images/jdk/bin/java -version
>> 0.018080 +- 0.000388 seconds time elapsed ( +- 2.15% )
>> 
>> (After)
>> $ perf stat -r 40 ./images/jdk/bin/java -version
>> 0.011986 +- 0.000205 seconds time elapsed ( +- 1.71% )
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   @shipilev review comments

make/Images.gmk line 141:

> 139: 
> 140:   $$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
> 141:       WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jdk image for $1: $$($1_$2_CDS_DUMP_FLAGS), \

The actual flags is too much detail to put on the highest (badly named) WARN level. Instead introduce an additional INFO output, something like this:

 INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \

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

PR: https://git.openjdk.org/jdk/pull/9984



More information about the build-dev mailing list