src/hotspot/share/gc/shared/satbMarkQueue.cpp
changeset 52582 6df094be7f58
parent 51441 2e91d927e00c
child 52726 9cfa2e273b77
equal deleted inserted replaced
52581:d402a406bbc3 52582:6df094be7f58
   109   PtrQueueSet(),
   109   PtrQueueSet(),
   110   _shared_satb_queue(this, true /* permanent */),
   110   _shared_satb_queue(this, true /* permanent */),
   111   _buffer_enqueue_threshold(0)
   111   _buffer_enqueue_threshold(0)
   112 {}
   112 {}
   113 
   113 
   114 void SATBMarkQueueSet::initialize(Monitor* cbl_mon, Mutex* fl_lock,
   114 void SATBMarkQueueSet::initialize(Monitor* cbl_mon,
       
   115                                   BufferNode::Allocator* allocator,
   115                                   int process_completed_threshold,
   116                                   int process_completed_threshold,
   116                                   uint buffer_enqueue_threshold_percentage,
   117                                   uint buffer_enqueue_threshold_percentage,
   117                                   Mutex* lock) {
   118                                   Mutex* lock) {
   118   PtrQueueSet::initialize(cbl_mon, fl_lock, process_completed_threshold, -1);
   119   PtrQueueSet::initialize(cbl_mon, allocator, process_completed_threshold, -1);
   119   _shared_satb_queue.set_lock(lock);
   120   _shared_satb_queue.set_lock(lock);
   120   assert(buffer_size() != 0, "buffer size not initialized");
   121   assert(buffer_size() != 0, "buffer size not initialized");
   121   // Minimum threshold of 1 ensures enqueuing of completely full buffers.
   122   // Minimum threshold of 1 ensures enqueuing of completely full buffers.
   122   size_t size = buffer_size();
   123   size_t size = buffer_size();
   123   size_t enqueue_qty = (size * buffer_enqueue_threshold_percentage) / 100;
   124   size_t enqueue_qty = (size * buffer_enqueue_threshold_percentage) / 100;