8214144: Remove confusing locking_enqueue_completed_buffer
authorkbarrett
Wed, 21 Nov 2018 09:40:19 -0500 (2018-11-21)
changeset 52637 0877040ec224
parent 52636 f52ea62d68cc
child 52638 f39854fffca0
8214144: Remove confusing locking_enqueue_completed_buffer Summary: Remove function. Reviewed-by: tschatzl, manc
src/hotspot/share/gc/shared/ptrQueue.cpp
src/hotspot/share/gc/shared/ptrQueue.hpp
--- a/src/hotspot/share/gc/shared/ptrQueue.cpp	Wed Nov 21 15:22:28 2018 +0100
+++ b/src/hotspot/share/gc/shared/ptrQueue.cpp	Wed Nov 21 09:40:19 2018 -0500
@@ -74,12 +74,6 @@
   _buf[index()] = ptr;
 }
 
-void PtrQueue::locking_enqueue_completed_buffer(BufferNode* node) {
-  assert(_lock->owned_by_self(), "Required.");
-  qset()->enqueue_complete_buffer(node);
-}
-
-
 BufferNode* BufferNode::allocate(size_t size) {
   size_t byte_size = size * sizeof(void*);
   void* data = NEW_C_HEAP_ARRAY(char, buffer_offset() + byte_size, mtGC);
@@ -222,7 +216,7 @@
       BufferNode* node = BufferNode::make_node_from_buffer(_buf, index());
       _buf = NULL;         // clear shared _buf field
 
-      locking_enqueue_completed_buffer(node); // enqueue completed buffer
+      qset()->enqueue_complete_buffer(node);
       assert(_buf == NULL, "multiple enqueuers appear to be racing");
     } else {
       BufferNode* node = BufferNode::make_node_from_buffer(_buf, index());
--- a/src/hotspot/share/gc/shared/ptrQueue.hpp	Wed Nov 21 15:22:28 2018 +0100
+++ b/src/hotspot/share/gc/shared/ptrQueue.hpp	Wed Nov 21 09:40:19 2018 -0500
@@ -154,7 +154,6 @@
   // get into an infinite loop).
   virtual bool should_enqueue_buffer() { return true; }
   void handle_zero_index();
-  void locking_enqueue_completed_buffer(BufferNode* node);
 
   void enqueue_known_active(void* ptr);