RFR: 8341371: CDS cannot load archived heap objects with -XX:+UseSerialGC -XX:-UseCompressedOops
Matias Saavedra Silva
matsaave at openjdk.org
Wed Oct 23 15:45:09 UTC 2024
On Wed, 23 Oct 2024 05:00:44 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> [JDK-8298614](https://bugs.openjdk.org/browse/JDK-8298614) enabled writing the archived heap region with SerialGC and ParallelGC, but archives written with XX:-UseCompressedOops can't be loaded at runtime. This patch enables heap loading for SerialGC and ParallelGC as well as EpsilonGC and Shenandoah since they were enabled in [JDK-8341913](https://bugs.openjdk.org/browse/JDK-8341913). Related tests were updated to check for the new conditions. Verified with tier 1-5 tests.
>
> src/hotspot/share/prims/whitebox.cpp line 2162:
>
>> 2160:
>> 2161: WB_ENTRY(jboolean, WB_CanWriteJavaHeapArchive(JNIEnv* env))
>> 2162: return HeapShared::can_write() && ArchiveHeapLoader::can_use();
>
> Do we still need the `&& ArchiveHeapLoader::can_use()` part?
I left it in since it may be a valuable check in case there are further changes or additions to the GCs.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21647#discussion_r1813067894
More information about the shenandoah-dev
mailing list