classLoaderExt.cpp contains a mix of unconditional API definitions and those guarded by:
#if INCLUDE_CDS
indicating the file expects to be compiled in both CDS and non-CDS builds. However the build file:
make / hotspot/lib/JvmFeatures.gmk
excludes classLoaderExt.cpp from being compiled in non-CDS builds.
This is inconsistent.
There is logic in jvmtiEnv.cpp that uses a function from ClassLoaderExt unconditionally, but if you disable CDS it won't compile - seeJDK-8204965 for how this problem was discovered (and worked around). This was not discovered previously because we only exclude CDS for the Minimal VM which also excludes JVM TI.
Either classLoaderExt.cpp should not be excluded from the build (and the change fromJDK-8204965 reverted), or else it should not have any INCLUDE_CDS guards.
#if INCLUDE_CDS
indicating the file expects to be compiled in both CDS and non-CDS builds. However the build file:
make / hotspot/lib/JvmFeatures.gmk
excludes classLoaderExt.cpp from being compiled in non-CDS builds.
This is inconsistent.
There is logic in jvmtiEnv.cpp that uses a function from ClassLoaderExt unconditionally, but if you disable CDS it won't compile - see
Either classLoaderExt.cpp should not be excluded from the build (and the change from