changeset 38161:1c7dd1e39fcf

8155811: Remove HeapRegionRemSet::_coarse_dirty flag Reviewed-by: mgerdin, jmasa
author tschatzl
date Mon, 02 May 2016 14:14:16 +0200
parents 13a14d5777b0
children f231a9615b65 6ca54f652c19 f89f2032196c
files hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
diffstat 2 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp	Mon May 02 14:13:05 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp	Mon May 02 14:14:16 2016 +0200
@@ -265,8 +265,7 @@
   _first_all_fine_prts(NULL), _last_all_fine_prts(NULL),
   _n_fine_entries(0), _n_coarse_entries(0),
   _fine_eviction_start(0),
-  _sparse_table(hr),
-  _coarse_dirty(false)
+  _sparse_table(hr)
 {
   typedef PerRegionTable* PerRegionTablePtr;
 
@@ -505,7 +504,6 @@
   size_t max_hrm_index = (size_t) max->hr()->hrm_index();
   if (!_coarse_map.at(max_hrm_index)) {
     _coarse_map.at_put(max_hrm_index, true);
-    _coarse_dirty = true;
     _n_coarse_entries++;
   }
 
@@ -521,10 +519,9 @@
   log_develop_trace(gc, remset, scrub)("Scrubbing region %u:", _hr->hrm_index());
 
   log_develop_trace(gc, remset, scrub)("   Coarse map: before = " SIZE_FORMAT "...", _n_coarse_entries);
-  if (_coarse_dirty) {
+  if (_n_coarse_entries > 0) {
     live_data->remove_nonlive_regions(&_coarse_map);
     _n_coarse_entries = _coarse_map.count_one_bits();
-    _coarse_dirty = _n_coarse_entries != 0;
   }
   log_develop_trace(gc, remset, scrub)("   after = " SIZE_FORMAT ".", _n_coarse_entries);
 
@@ -651,9 +648,8 @@
 
   _first_all_fine_prts = _last_all_fine_prts = NULL;
   _sparse_table.clear();
-  if (_coarse_dirty) {
+  if (_n_coarse_entries > 0) {
     _coarse_map.clear();
-    _coarse_dirty = false;
   }
   _n_fine_entries = 0;
   _n_coarse_entries = 0;
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp	Mon May 02 14:13:05 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp	Mon May 02 14:14:16 2016 +0200
@@ -79,7 +79,6 @@
   HeapRegion*      _hr;
 
   // These are protected by "_m".
-  bool        _coarse_dirty;
   BitMap      _coarse_map;
   size_t      _n_coarse_entries;
   static jint _n_coarsenings;