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

Add scope for relaxing constraint on JavaCalls from CompilerThread

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • hotspot
    • b23

      JDK-8318694 limited the ability for JVMCI CompileBroker threads (i.e. CompilerThreads) to make Java upcalls. This is to mitigate against deadlock when the upcall does class loading. Class loading can easily create deadlock situations in -Xcomp or -Xbatch mode.

      However, for Truffle, upcalls are unavoidable if Truffle partial evaluation occurs as part of JIT compilation inlining. This occurs when the inliner produces/sees a constant Truffle AST which allows a Truffle-specific inlining extension to perform Truffle partial evaluation on the constant. Such PE involves upcalls to the Truffle runtime (running in Java).

      What's needed is an escape hatch such that Truffle specific logic can put a compiler thread into "allow Java upcall" mode during the scope of the Truffle logic.

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

              Created:
              Updated:
              Resolved: