src/hotspot/share/gc/shared/collectedHeap.hpp
changeset 49466 6ce398fe53fd
parent 49054 fa4c8865a4ff
child 49593 4dd58ecc9912
child 56406 e629240491c7
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp	Fri Mar 16 19:13:13 2018 +0100
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp	Tue Mar 20 15:59:36 2018 +0100
@@ -588,6 +588,15 @@
   // 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);
+
   // Non product verification and debugging.
 #ifndef PRODUCT
   // Support for PromotionFailureALot.  Return true if it's time to cause a