RFR: 8262376: ReplaceCriticalClassesForSubgraphs.java fails if --with-build-jdk is used
Ioi Lam
iklam at openjdk.java.net
Thu Apr 29 04:15:51 UTC 2021
On Thu, 29 Apr 2021 01:41:34 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Does this mean that when using CDS some classes are not subject to the application of the JVM TI ClassFileLoadHook? And if so, is that constraint documented somewhere?
Hi David, thanks for the review.
CDS tries to be transparent w.r.t. ClassFileLoadHook:
- If JVMTI "early" ClassFileLoadHooks are enabled, CDS is disabled.
- If only JVMTI "non-early" ClassFileLoadHooks are enabled, they will get all the class loading events that happen after the VM has finished the early phase. (This is the same whether CDS is enabled or not).
Since the module graph is built during the early phase, a "non-early" ClassFileLoadHook cannot expect to get the loading events for the classes that were loaded in order to build the module graph.
The exact set of such classes depend on the implementation of the module system, so it could change between JDK versions. This change only affects two internal classes - sun.net.www.protocol.jrt.Handler and jdk.internal.module.SystemModuleFinders$SystemModuleReader, so I think the impact is minimal.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3780
More information about the hotspot-runtime-dev
mailing list