src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
changeset 49665 8bad6c08a732
parent 49664 9a04cc89dde0
child 49666 55f8f5635ef7
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Wed Apr 04 11:21:14 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Wed Apr 04 11:21:14 2018 +0200
@@ -588,10 +588,6 @@
   set_concurrency(active_tasks);
 
   _concurrent = concurrent;
-  // We propagate this to all tasks, not just the active ones.
-  for (uint i = 0; i < _max_num_tasks; ++i) {
-    _tasks[i]->set_concurrent(concurrent);
-  }
 
   if (concurrent) {
     set_concurrent_marking_in_progress();
@@ -2126,7 +2122,7 @@
   // If we are not concurrent (i.e. we're doing remark) we don't need
   // to check anything else. The other steps are only needed during
   // the concurrent marking phase.
-  if (!_concurrent) {
+  if (!_cm->concurrent()) {
     return;
   }
 
@@ -2324,7 +2320,7 @@
   _draining_satb_buffers = false;
 
   assert(has_aborted() ||
-         _concurrent ||
+         _cm->concurrent() ||
          satb_mq_set.completed_buffers_num() == 0, "invariant");
 
   // again, this was a potentially expensive operation, decrease the
@@ -2479,7 +2475,6 @@
                                bool do_termination,
                                bool is_serial) {
   assert(time_target_ms >= 1.0, "minimum granularity is 1ms");
-  assert(_concurrent == _cm->concurrent(), "they should be the same");
 
   _start_time_ms = os::elapsedVTime() * 1000.0;
 
@@ -2701,7 +2696,7 @@
 
       if (_worker_id == 0) {
         // Let's allow task 0 to do this
-        if (_concurrent) {
+        if (_cm->concurrent()) {
           assert(_cm->concurrent_marking_in_progress(), "invariant");
           // We need to set this to false before the next
           // safepoint. This way we ensure that the marking phase
@@ -2825,7 +2820,6 @@
   _elapsed_time_ms(0.0),
   _termination_time_ms(0.0),
   _termination_start_time_ms(0.0),
-  _concurrent(false),
   _marking_step_diffs_ms()
 {
   guarantee(task_queue != NULL, "invariant");