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

Add JVMTI function GetNamedModule

XMLWordPrintable

    • b129

      JVM TI agents that instrument code in named modules need the Module at class load time. One way to do this is by introducing a new ClassFileLoadHook that takes an additional parameter but this approach is disruptive. The alternative option is a JVM TI function that maps a classloader + package name to a module. We were initially not confident with this approach so we introduced it as JVM function JVM_GetModuleByPackageName. Based on experience to date then this approach seems okay and so this function needs to be promoted to a JVMTI function.

      Update: This function has to be live phase only. Also the most consistent way to define this function is for it to return the unnamed module of the ClassLoader when the package is not in a named module defined to the class loader.

            sspitsyn Serguei Spitsyn
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: