< prev index next >

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

Print this page
rev 57716 : [mq]: remove_cbl_mon

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -87,10 +87,15 @@
         vm_shutdown_during_initialization("Could not allocate refinement threads.");
         return JNI_ENOMEM;
       }
     }
   }
+
+  if (num_max_threads > 0) {
+    G1BarrierSet::dirty_card_queue_set().set_primary_refinement_thread(_threads[0]);
+  }
+
   return JNI_OK;
 }
 
 void G1ConcurrentRefineThreadControl::maybe_activate_next(uint cur_worker_id) {
   assert(cur_worker_id < _num_max_threads,

@@ -106,11 +111,11 @@
   if (thread_to_activate == NULL) {
     // Still need to create the thread...
     _threads[worker_id] = create_refinement_thread(worker_id, false);
     thread_to_activate = _threads[worker_id];
   }
-  if (thread_to_activate != NULL && !thread_to_activate->is_active()) {
+  if (thread_to_activate != NULL) {
     thread_to_activate->activate();
   }
 }
 
 void G1ConcurrentRefineThreadControl::print_on(outputStream* st) const {
< prev index next >