src/hotspot/share/gc/shared/collectedHeap.hpp
changeset 49669 3569b528972e
parent 49629 b786280276dc
child 49754 ee93c1087584
child 56422 b09629f4b243
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp	Wed Apr 04 11:25:26 2018 +0200
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp	Wed Apr 04 11:59:47 2018 +0200
@@ -589,14 +589,12 @@
   // perform cleanup tasks serially in the VMThread.
   virtual WorkGang* get_safepoint_workers() { return NULL; }
 
-  // Support for object pinning. This is used by JNI's Get*Critical() and
-  // Release*Critical() family of functions. A GC may either use the GCLocker
-  // protocol to ensure no critical arrays are in-use when entering
-  // a GC pause, or it can implement pinning, which must guarantee that
-  // the object does not move while pinned.
-  virtual oop pin_object(JavaThread* thread, oop o);
-
-  virtual void unpin_object(JavaThread* thread, oop o);
+  // Support for object pinning. This is used by JNI Get*Critical()
+  // and Release*Critical() family of functions. If supported, the GC
+  // must guarantee that pinned objects never move.
+  virtual bool supports_object_pinning() const;
+  virtual oop pin_object(JavaThread* thread, oop obj);
+  virtual void unpin_object(JavaThread* thread, oop obj);
 
   // Non product verification and debugging.
 #ifndef PRODUCT