src/hotspot/share/gc/g1/heapRegionRemSet.cpp
changeset 52656 11b97acc9c7f
parent 52347 14ef0f74667b
child 52716 877dd2b0f36c
--- a/src/hotspot/share/gc/g1/heapRegionRemSet.cpp	Thu Nov 22 09:23:05 2018 +0100
+++ b/src/hotspot/share/gc/g1/heapRegionRemSet.cpp	Thu Nov 22 09:25:19 2018 +0100
@@ -368,8 +368,7 @@
 
       CardIdx_t card_index = card_within_region(from, from_hr);
 
-      if (G1HRRSUseSparseTable &&
-          _sparse_table.add_card(from_hrm_ind, card_index)) {
+      if (_sparse_table.add_card(from_hrm_ind, card_index)) {
         assert(contains_reference_locked(from), "We just added " PTR_FORMAT " to the Sparse table", p2i(from));
         return;
       }
@@ -397,18 +396,16 @@
       OrderAccess::release_store(&_fine_grain_regions[ind], prt);
       _n_fine_entries++;
 
-      if (G1HRRSUseSparseTable) {
-        // Transfer from sparse to fine-grain.
-        SparsePRTEntry *sprt_entry = _sparse_table.get_entry(from_hrm_ind);
-        assert(sprt_entry != NULL, "There should have been an entry");
-        for (int i = 0; i < sprt_entry->num_valid_cards(); i++) {
-          CardIdx_t c = sprt_entry->card(i);
-          prt->add_card(c);
-        }
-        // Now we can delete the sparse entry.
-        bool res = _sparse_table.delete_entry(from_hrm_ind);
-        assert(res, "It should have been there.");
+      // Transfer from sparse to fine-grain.
+      SparsePRTEntry *sprt_entry = _sparse_table.get_entry(from_hrm_ind);
+      assert(sprt_entry != NULL, "There should have been an entry");
+      for (int i = 0; i < sprt_entry->num_valid_cards(); i++) {
+        CardIdx_t c = sprt_entry->card(i);
+        prt->add_card(c);
       }
+      // Now we can delete the sparse entry.
+      bool res = _sparse_table.delete_entry(from_hrm_ind);
+      assert(res, "It should have been there.");
     }
     assert(prt != NULL && prt->hr() == from_hr, "consequence");
   }