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.
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.
- duplicates
-
JDK-8220623 [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
- Resolved
- is blocked by
-
JDK-8211652 Update JVMCI to support JVMCI based Compiler compiled into shared library
- Closed