Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205327

Clean up #if INCLUDE_CDS classLoaderExt.cpp and classLoaderExt.hpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 11
    • hotspot
    • b18

      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 - see JDK-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 from JDK-8204965 reverted), or else it should not have any INCLUDE_CDS guards.

            jiangli Jiangli Zhou
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: