On Tue, 23 Aug 2022 16:49:01 GMT, Ioi Lam <ik...@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
Zero can default to G1 after #9994. Together with this patch, it should also be able to use the shared heap from CDS, I think. It also tells me that it is good to force G1 at CDS dump time, even without Zero, because the ergonomics might select Serial on some machines. (Like, as I remember from the `compilerDefinitions.cpp` code, might happen on Windows x86_32 that drops to "client emulation" mode.). ------------- PR: https://git.openjdk.org/jdk/pull/9984