--- a/src/hotspot/share/runtime/sharedRuntime.cpp Tue Jul 31 16:49:51 2018 +0100
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp Tue Jul 31 13:12:06 2018 -0400
@@ -2863,6 +2863,22 @@
GCLocker::unlock_critical(thread);
JRT_END
+JRT_LEAF(oopDesc*, SharedRuntime::pin_object(JavaThread* thread, oopDesc* obj))
+ assert(Universe::heap()->supports_object_pinning(), "Why we are here?");
+ assert(obj != NULL, "Should not be null");
+ oop o(obj);
+ o = Universe::heap()->pin_object(thread, o);
+ assert(o != NULL, "Should not be null");
+ return o;
+JRT_END
+
+JRT_LEAF(void, SharedRuntime::unpin_object(JavaThread* thread, oopDesc* obj))
+ assert(Universe::heap()->supports_object_pinning(), "Why we are here?");
+ assert(obj != NULL, "Should not be null");
+ oop o(obj);
+ Universe::heap()->unpin_object(thread, o);
+JRT_END
+
// -------------------------------------------------------------------------
// Java-Java calling convention
// (what you use when Java calls Java)