8207056: Epsilon GC to support object pinning
authorzgu
Wed, 11 Jul 2018 13:55:38 -0400
changeset 51042 f378705346bf
parent 51041 5c3c53703b8b
child 51043 6c449bdee4fa
8207056: Epsilon GC to support object pinning Summary: Epsilon GC to use object pinning to avoid expensive GCLocker Reviewed-by: shade, rkennke
src/hotspot/share/gc/epsilon/epsilonHeap.hpp
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.hpp	Thu Jul 12 12:22:54 2018 +0200
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.hpp	Wed Jul 11 13:55:38 2018 -0400
@@ -121,6 +121,11 @@
     safe_object_iterate(cl);
   }
 
+  // Object pinning support: every object is implicitly pinned
+  virtual bool supports_object_pinning() const           { return true; }
+  virtual oop pin_object(JavaThread* thread, oop obj)    { return obj; }
+  virtual void unpin_object(JavaThread* thread, oop obj) { }
+
   // No support for block parsing.
   virtual HeapWord* block_start(const void* addr) const { return NULL;  }
   virtual size_t block_size(const HeapWord* addr) const { return 0;     }