< prev index next >

src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp

Print this page
rev 56111 : [mq]: fix

@@ -89,11 +89,11 @@
   _process_completed_buffers_threshold(ProcessCompletedBuffersThresholdNever),
   _process_completed_buffers(false),
   _notify_when_complete(notify_when_complete),
   _max_completed_buffers(MaxCompletedBuffersUnlimited),
   _completed_buffers_padding(0),
-  _free_ids(NULL),
+  _free_ids(new G1FreeIdSet(0, num_par_ids())),
   _processed_buffers_mut(0),
   _processed_buffers_rs_thread(0)
 {
   _all_active = true;
 }

@@ -107,18 +107,14 @@
 uint G1DirtyCardQueueSet::num_par_ids() {
   return (uint)os::initial_active_processor_count();
 }
 
 void G1DirtyCardQueueSet::initialize(Monitor* cbl_mon,
-                                     BufferNode::Allocator* allocator,
-                                     bool init_free_ids) {
+                                     BufferNode::Allocator* allocator) {
   PtrQueueSet::initialize(allocator);
   assert(_cbl_mon == NULL, "Init order issue?");
   _cbl_mon = cbl_mon;
-  if (init_free_ids) {
-    _free_ids = new G1FreeIdSet(0, num_par_ids());
-  }
 }
 
 void G1DirtyCardQueueSet::handle_zero_index_for_thread(Thread* t) {
   G1ThreadLocalData::dirty_card_queue(t).handle_zero_index();
 }

@@ -289,12 +285,10 @@
   enqueue_completed_buffer(node);
   return false;
 }
 
 bool G1DirtyCardQueueSet::mut_process_buffer(BufferNode* node) {
-  guarantee(_free_ids != NULL, "must be");
-
   uint worker_i = _free_ids->claim_par_id(); // temporarily claim an id
   G1RefineCardConcurrentlyClosure cl;
   bool result = apply_closure_to_buffer(&cl, node, worker_i);
   _free_ids->release_par_id(worker_i); // release the id
 
< prev index next >