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

jdk.vm.compiler module needs to be upgradeable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 9
    • 9
    • hotspot

      Now that jdk.vm.compiler has been integrated (on Linux), it's not clear how to do development of upstream Graal (https://github.com/graalvm/graal-core) on JDK9. We effectively need to deploy newer versions of jdk.vm.compiler. That is, jdk.vm.compiler needs to be upgradeable which it isn't today. Currently, this can be worked around with the --patch-module option. Assuming an upstream Graal module (named jdk.vm.compiler) is in graal.jar (and its dependent module Truffle is in truffle.jar), this java command works:

      java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI --module-path=truffle.jar --upgrade-module-path=graal.jar --patch-module jdk.vm.compiler=empty.jar -version
      Bootstrapping JVMCI[running github Graal]
      ....................

      It works even if empty.jar doesn't exist (I suspect this is a bug that will be fixed). Without the --patch-module option, the hash check fails:

      java -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI --module-path=truffle.jar --upgrade-module-path=graal.jar -version
      Error occurred during initialization of VM
      java.lang.module.ResolutionException: Hash of jdk.vm.compiler (b3af8266ede213d1175f97d2de09e02c2a5b144b68c38e7b9590c7b5df1e4095) differs to expected hash (97da9477678410aecd98179a2d33552decbd837d9deaa4c827e304052909afd7) recorded in java.base
              at java.lang.module.Resolver.fail(java.base@9-labs/Resolver.java:841)
              at java.lang.module.Resolver.checkHashes(java.base@9-labs/Resolver.java:465)
              ...

      It is imperative that it be possible to develop and deploy upstream Graal on JDK9 without having to build the JDK and as such, jdk.vm.compiler must be made upgradeable or some other solution needs to be implemented.

        1. graal.jar
          5.57 MB
        2. graal.jar
          5.57 MB
        3. truffle.jar
          777 kB
        4. truffle.jar
          777 kB
        5. truffle.jar
          777 kB

            dnsimon Douglas Simon
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: