RFR: 8262376: ReplaceCriticalClassesForSubgraphs.java fails if --with-build-jdk is used

Ioi Lam iklam at openjdk.java.net
Thu Apr 29 19:34:52 UTC 2021


On Thu, 29 Apr 2021 05:58:02 GMT, Alan Bateman <alanb 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?
> 
> At one point, enabling the can_generate_all_class_hook_events capability in the onload phase would disable CDS but maybe that has changed? In any case, the only place in the specs where it touches on this is in the CFLH event itself where it has a sentence about not generating the event for some classes.

CDS started supporting ClassFileLoadHook since [JDK-8078644](https://bugs.openjdk.java.net/browse/JDK-8078644) (JDK9). At that time, CLFH was enabled for all shared classes.

However, since [JDK-8212200](https://bugs.openjdk.java.net/browse/JDK-8212200) (JDK12), we disable CDS when `JvmtiExport::has_early_class_hook_env() == true`.

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

PR: https://git.openjdk.java.net/jdk/pull/3780


More information about the hotspot-runtime-dev mailing list