RFR: 8198474: Move JNIHandles::resolve into jniHandles.inline.hpp

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Wed Feb 21 12:33:26 UTC 2018


http://cr.openjdk.java.net/~kbarrett/8198474/open.00/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp.udiff.html

I think you should move these oop functions to the cpp file, rather than 
leave FIXME.  This seems very limited.

   objArrayOop sites() { return (objArrayOop) 
JNIHandles::resolve(_sites_handle); }
   arrayOop code() { return (arrayOop) JNIHandles::resolve(_code_handle); }
   arrayOop data_section() { return (arrayOop) 
JNIHandles::resolve(_data_section_handle); }
   objArrayOop data_section_patches() { return (objArrayOop) 
JNIHandles::resolve(_data_section_patches_handle); }
#ifndef PRODUCT
   objArrayOop comments() { return (objArrayOop) 
JNIHandles::resolve(_comments_handle); }
#endif

   oop word_kind() { return (oop) JNIHandles::resolve(_word_kind_handle); }

http://cr.openjdk.java.net/~kbarrett/8198474/open.00/src/hotspot/share/jvmci/jvmciJavaClasses.hpp.udiff.html

This one is not so easy, so can you add to FIXME some short comment to 
not include .inline.hpp in hpp files?

The rest looks good.

Thanks,
Coleen


On 2/20/18 10:02 PM, Kim Barrett wrote:
> Please review this change to split jniHandles.hpp, moving the inline
> definition of JNIHandles::resolve and related functions to the new
> jniHandles.inline.hpp.  This is being done in preparation for
> JDK-8195972 "Refactor oops in JNI to use the Access API".  This is
> needed so we can include access.inline.hpp as part of that change,
> making the implementation of Access available for reference by
> JNIHandles::resolve &etc.
>
> This was accomplished largly by a simple copy of the code, and
> updating the #includes of lots of files.  However,
> resolve_external_guard was changed to no longer be inline.  It doesn't
> seem to be performance critical, and this change reduced the fanout on
> #include updates.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8198474
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8198474/open.00/
> [Note to Oracle reviewers: There is a closed part to this change too.]
>
> Testing:
> hs-tier1 in isolation
> {hs,jdk}-tier{1,2,3} JDK-8195972 as part of changes for JDK-8195972
>
>



More information about the hotspot-dev mailing list