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

JVM should manage multiple versions of compiled methods



      Currently, a JVM byte coded method has a single nullable pointer which refers to its unique compiled "nmethod", called Method::_code.

      If the JVM needs to manage multiple compiled versions of a method, this design does not scale. For example, we store OSR methods (perhaps several versions per method distinguished by entry point BCI) in a per-class side table.

      In the future, mixtures of profiled and optimized execution modes may require two or more versions of a method (at different profile levels) to be kept available at the same time. Also in the future, heterogeneous processing platforms may require optimized n-methods for more than one ISA at the same time.

      To make this situation manageable, the _code field should be the root of a linked list of n-methods, reaching all versions of a given method. An additional field nmethod::_next_code can link to additional versions. The first item in the linked list can be privileged to interoperate with stubs and with normal calls on the CPU.

      More background: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2013-October/012078.html


          Issue Links



              • Assignee:
                jrose John Rose
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: