changeset 49529:8bad6c08a732

8200255: Remove G1CMTask::_concurrent Reviewed-by: sangheki, sjohanss
author tschatzl
date Wed, 04 Apr 2018 11:21:14 +0200
parents 9a04cc89dde0
children 55f8f5635ef7
files src/hotspot/share/gc/g1/g1ConcurrentMark.cpp src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
diffstat 2 files changed, 3 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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");
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp	Wed Apr 04 11:21:14 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp	Wed Apr 04 11:21:14 2018 +0200
@@ -706,12 +706,6 @@
   // When this task got into the termination protocol
   double                      _termination_start_time_ms;
 
-  // True when the task is during a concurrent phase, false when it is
-  // in the remark phase (so, in the latter case, we do not have to
-  // check all the things that we have to check during the concurrent
-  // phase, i.e. SATB buffer availability...)
-  bool                        _concurrent;
-
   TruncatedSeq                _marking_step_diffs_ms;
 
   // Updates the local fields after this task has claimed
@@ -755,8 +749,6 @@
   // Clears all the fields that correspond to a claimed region.
   void clear_region_fields();
 
-  void set_concurrent(bool concurrent) { _concurrent = concurrent; }
-
   // The main method of this class which performs a marking step
   // trying not to exceed the given duration. However, it might exit
   // prematurely, according to some conditions (i.e. SATB buffers are