RFR: JDK-8302989: Add missing INCLUDE_CDS checks [v4]

Ioi Lam iklam at openjdk.org
Wed Mar 29 19:29:23 UTC 2023


On Wed, 8 Mar 2023 09:27:27 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > Maybe we can keep the -Xshare flags and make their behavior consistent with builds that have CDS enabled
> 
> This might help the tests but semantically this just seems wrong to me. It would be like accepting G1 flags when you only have SerialGC available.

The following is the current behavior when `-Xshare` is used when CDS is disabled. If we want to remove `-Xshare` completely, a CSR will be needed.


$ minimal/bin/java -Xshare:on -version
Shared spaces are not supported in this VM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

$ minimal/bin/java -Xshare:auto -version
Java HotSpot(TM) 64-Bit Minimal VM warning: Shared spaces are not supported in this VM
java version "21-internal" 2023-09-19
Java(TM) SE Runtime Environment (fastdebug build 21-internal-adhoc.iklam.nep)
Java HotSpot(TM) 64-Bit Minimal VM (fastdebug build 21-internal-adhoc.iklam.nep, mixed mode, emulated-client)

$ minimal/bin/java -Xshare:off -version
java version "21-internal" 2023-09-19
Java(TM) SE Runtime Environment (fastdebug build 21-internal-adhoc.iklam.nep)
Java HotSpot(TM) 64-Bit Minimal VM (fastdebug build 21-internal-adhoc.iklam.nep, mixed mode, emulated-client)

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

PR Comment: https://git.openjdk.org/jdk/pull/12691#issuecomment-1489179866


More information about the hotspot-dev mailing list