git: openjdk/leyden: hermetic-java-runtime: 4 new changesets

duke duke at openjdk.org
Mon Nov 27 23:45:52 UTC 2023


Changeset: e9709e73
Author:    Jiangli Zhou <jianglizhou at google.com>
Date:      2023-09-25 16:46:24 +0000
URL:       https://git.openjdk.org/leyden/commit/e9709e73b49171d556bae396243a717517202214

Comment out and revert JavaHome related change in JDKPlatformProvider.java as it requires JavaHome class in boot JDK.

! src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java

Changeset: bd9f0d26
Author:    Jiangli Zhou <jianglizhou at google.com>
Date:      2023-09-25 17:32:13 +0000
URL:       https://git.openjdk.org/leyden/commit/bd9f0d26c458b3f7eee4a74a84a8c4367ee5ed28

Add logging for hermetic Java.

Hermetic Java related logging can be enabled by -Xlog:hermetic (or -Xlog:hermetic=info).

! src/hotspot/share/logging/logTag.hpp
! src/hotspot/share/runtime/arguments.cpp

Changeset: cf1724e7
Author:    Jiangli Zhou <jianglizhou at google.com>
Date:      2023-09-26 10:48:10 +0000
URL:       https://git.openjdk.org/leyden/commit/cf1724e7060f3a48fe8524ce17d0dd94b72a15fc

Add DisableHermetic flag for disabling hermetic Java runtime.

If a hermetic JAR is used, setting DisableHermetic to true disables the hermetic Java runtime (the JDK modules image and JDK resources) packaged in JAR. The flag has no effect, if the JAR is non-hermetic. It does not affect the JDK static support either.

This option should only be used for a few limited use cases, such as:
- During testing/debugging for isolating JDK issues when necessary.

! src/hotspot/share/runtime/arguments.cpp
! src/hotspot/share/runtime/arguments.hpp
! src/hotspot/share/runtime/globals.hpp
! src/hotspot/share/runtime/threads.cpp

Changeset: 931b71b0
Author:    Jiangli Zhou <jianglizhou at google.com>
Date:      2023-09-27 16:09:50 +0000
URL:       https://git.openjdk.org/leyden/commit/931b71b0845d24b1949a23333ef1cdb3d6622596

Support POSIX_SPAWN launch mechanism for ProcessBuilder.start() on hermetic Java.

Moved the code from jspawnhelper.c to childproc.c and renamed the original main() (in jspawnhelper.c) to JDK_spawn_process() in childproc.c. The jspawnhelper.c main() is now a simple wrapper of JDK_spawn_process(). JDK_spawn_process() can be shared by jspawnhelper and launcher for creating child process using POSIX_SPAWN launch mechanism.

! src/java.base/share/classes/jdk/internal/misc/JavaHome.java
! src/java.base/unix/classes/java/lang/ProcessImpl.java
! src/java.base/unix/native/jspawnhelper/jspawnhelper.c
! src/java.base/unix/native/libjava/ProcessImpl_md.c
! src/java.base/unix/native/libjava/childproc.c
! src/java.base/unix/native/libjava/childproc.h



More information about the leyden-dev mailing list