RFR: 8198474: Move JNIHandles::resolve into jniHandles.inline.hpp
Per Liden
per.liden at oracle.com
Wed Feb 21 09:00:49 UTC 2018
Hi Kim,
On 02/21/2018 04:02 AM, 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.]
src/hotspot/share/ci/ciObject.cpp
---------------------------------
+// Get the oop of this ciObject.
+oop ciObject::get_oop() const {
+ assert(_handle != NULL, "null oop");
+ return JNIHandles::resolve_non_null(_handle);
+}
I know your change didn't add it, but the above assert is unnecessary,
since JNIHandles::resolve_non_null() already does exactly that. I
suggest we just remove it.
src/hotspot/share/jvmci/jvmciCodeInstaller.hpp
----------------------------------------------
+// --- FIXME
+#include "runtime/jniHandles.inline.hpp"
Looks like a FIXME was left here, and the include line sits outside of
the main include block. Is there still something to fix here?
src/hotspot/share/jvmci/jvmciJavaClasses.hpp
--------------------------------------------
+// --- FIXME
+#include "runtime/jniHandles.inline.hpp"
Same here.
src/hotspot/share/runtime/jniHandles.inline.hpp
-----------------------------------------------
+
+#endif // include guard
+
Should be:
#endif // SHARE_RUNTIME_JNIHANDLES_INLINE_HPP
cheers,
Per
>
> 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