src/hotspot/share/gc/shared/collectedHeap.hpp
branchepsilon-gc-branch
changeset 56406 e629240491c7
parent 56276 ee5e58456be5
parent 49466 6ce398fe53fd
child 56422 b09629f4b243
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp	Mon Mar 26 17:27:47 2018 +0200
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp	Tue Apr 10 11:14:50 2018 +0200
@@ -589,6 +589,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