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

[JVMCI] simplify management of JVMCI nmethod mirror


    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: hotspot
    • Labels:


      There is logic in nmethod for managing the connection with a mirror object of type HotSpotNmethod. This is similar to the connection from a Klass to an java.lang.Class object (in the Klass::_java_mirror field). The nmethod mirror exists so that nmethods can be directly called via a Java API.

      For historic reasons, the reference to the nmethod mirror has been in a dedicated C++ field. Also, the nmethod mirror has had special handling in terms of impacting the unloadability of an nmethod. Due to changes made in the context of libgraal, it has become clear that this special logic is no longer needed and the nmethod mirror reference should just be an entry in the nmethod's oops table (i.e. at nmethod::oops_begin().

      While making these simplifications, the JVMCI specific data for an nmethod can become an inline object in an nmethod, simplifying cleanup of an unloaded nmethod further.


          Issue Links



              • Assignee:
                kvn Vladimir Kozlov
                dnsimon Douglas Simon
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: