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

InterpreterCodeSize should be computed


    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:


      Too often while developing with JVMCI, I still see this when trying to run the VM with support for attaching a debugger (e.g., -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y):

      # A fatal error has been detected by the Java Runtime Environment:
      # Internal Error (interpreter.hpp:105), pid=82573, tid=0x0000000000001703
      # guarantee(codelet_size > 0 && (size_t)codelet_size > 2*K) failed: not enough space for interpreter generation
      # JRE version: (8.0_92-b14) (build )
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.71-b01-internal-jvmci-0.21-dev mixed mode bsd-amd64 compressed oops)
      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      # An error report file with more information is saved as:
      # /Users/dsimon/graal/graal-core/hs_err_pid82573.log
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp

      The underlying issue is that the code cache size required for the interpreter should not be "guessed", especially if the guess doesn't allow for sufficient wiggle room. Instead, the interpreter should be generated into an oversized buffer that is trimmed back to exactly the right size.

      An intermediate fix would be convert InterpreterCodeSize from a C++ constant to a VM option so that the user can at least recover when the statically chosen guess was wrong.


          Issue Links



              • Assignee:
                simonis Volker Simonis
                dnsimon Douglas Simon
              • Votes:
                0 Vote for this issue
                7 Start watching this issue


                • Created: