src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
Print this page
rev 6540 : 8054819: Rename HeapRegionSeq to HeapRegionManager
Reviewed-by: jwilhelm, jmasa
@@ -25,11 +25,11 @@
#include "precompiled.hpp"
#include "gc_implementation/g1/concurrentG1Refine.hpp"
#include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/heapRegionRemSet.hpp"
-#include "gc_implementation/g1/heapRegionSeq.inline.hpp"
+#include "gc_implementation/g1/heapRegionManager.inline.hpp"
#include "memory/allocation.hpp"
#include "memory/padded.inline.hpp"
#include "memory/space.inline.hpp"
#include "oops/oop.inline.hpp"
#include "utilities/bitMap.inline.hpp"
@@ -417,11 +417,11 @@
void OtherRegionsTable::print_from_card_cache() {
FromCardCache::print();
}
void OtherRegionsTable::add_reference(OopOrNarrowOopStar from, int tid) {
- uint cur_hrs_ind = hr()->hrs_index();
+ uint cur_hrm_ind = hr()->hrm_index();
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print_cr("ORT::add_reference_work(" PTR_FORMAT "->" PTR_FORMAT ").",
from,
UseCompressedOops
@@ -432,24 +432,24 @@
int from_card = (int)(uintptr_t(from) >> CardTableModRefBS::card_shift);
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print_cr("Table for [" PTR_FORMAT "...): card %d (cache = "INT32_FORMAT")",
hr()->bottom(), from_card,
- FromCardCache::at((uint)tid, cur_hrs_ind));
+ FromCardCache::at((uint)tid, cur_hrm_ind));
}
- if (FromCardCache::contains_or_replace((uint)tid, cur_hrs_ind, from_card)) {
+ if (FromCardCache::contains_or_replace((uint)tid, cur_hrm_ind, from_card)) {
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print_cr(" from-card cache hit.");
}
assert(contains_reference(from), "We just added it!");
return;
}
// Note that this may be a continued H region.
HeapRegion* from_hr = _g1h->heap_region_containing_raw(from);
- RegionIdx_t from_hrs_ind = (RegionIdx_t) from_hr->hrs_index();
+ RegionIdx_t from_hrs_ind = (RegionIdx_t) from_hr->hrm_index();
// If the region is already coarsened, return.
if (_coarse_map.at(from_hrs_ind)) {
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print_cr(" coarse map hit.");
@@ -491,12 +491,12 @@
assert(contains_reference_locked(from), "We just added it!");
return;
} else {
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print_cr(" [tid %d] sparse table entry "
- "overflow(f: %d, t: %d)",
- tid, from_hrs_ind, cur_hrs_ind);
+ "overflow(f: %d, t: %u)",
+ tid, from_hrs_ind, cur_hrm_ind);
}
}
if (_n_fine_entries == _max_fine_entries) {
prt = delete_region_table();
@@ -604,13 +604,13 @@
}
guarantee(max != NULL, "Since _n_fine_entries > 0");
// Set the corresponding coarse bit.
- size_t max_hrs_index = (size_t) max->hr()->hrs_index();
- if (!_coarse_map.at(max_hrs_index)) {
- _coarse_map.at_put(max_hrs_index, true);
+ 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);
_n_coarse_entries++;
if (G1TraceHeapRegionRememberedSet) {
gclog_or_tty->print("Coarsened entry in region [" PTR_FORMAT "...] "
"for region [" PTR_FORMAT "...] (%d coarse entries).\n",
hr()->bottom(),
@@ -630,11 +630,11 @@
// At present, this must be called stop-world single-threaded.
void OtherRegionsTable::scrub(CardTableModRefBS* ctbs,
BitMap* region_bm, BitMap* card_bm) {
// First eliminated garbage regions from the coarse map.
if (G1RSScrubVerbose) {
- gclog_or_tty->print_cr("Scrubbing region %u:", hr()->hrs_index());
+ gclog_or_tty->print_cr("Scrubbing region %u:", hr()->hrm_index());
}
assert(_coarse_map.size() == region_bm->size(), "Precondition");
if (G1RSScrubVerbose) {
gclog_or_tty->print(" Coarse map: before = "SIZE_FORMAT"...",
@@ -653,13 +653,13 @@
while (cur != NULL) {
PerRegionTable* nxt = cur->collision_list_next();
// If the entire region is dead, eliminate.
if (G1RSScrubVerbose) {
gclog_or_tty->print_cr(" For other region %u:",
- cur->hr()->hrs_index());
+ cur->hr()->hrm_index());
}
- if (!region_bm->at((size_t) cur->hr()->hrs_index())) {
+ if (!region_bm->at((size_t) cur->hr()->hrm_index())) {
*prev = nxt;
cur->set_collision_list_next(NULL);
_n_fine_entries--;
if (G1RSScrubVerbose) {
gclog_or_tty->print_cr(" deleted via region map.");
@@ -749,11 +749,11 @@
size_t OtherRegionsTable::fl_mem_size() {
return PerRegionTable::fl_mem_size();
}
void OtherRegionsTable::clear_fcc() {
- FromCardCache::clear(hr()->hrs_index());
+ FromCardCache::clear(hr()->hrm_index());
}
void OtherRegionsTable::clear() {
// if there are no entries, skip this step
if (_first_all_fine_prts != NULL) {
@@ -800,11 +800,11 @@
return contains_reference_locked(from);
}
bool OtherRegionsTable::contains_reference_locked(OopOrNarrowOopStar from) const {
HeapRegion* hr = _g1h->heap_region_containing_raw(from);
- RegionIdx_t hr_ind = (RegionIdx_t) hr->hrs_index();
+ RegionIdx_t hr_ind = (RegionIdx_t) hr->hrm_index();
// Is this region in the coarse map?
if (_coarse_map.at(hr_ind)) return true;
PerRegionTable* prt = find_region_table(hr_ind & _mod_max_fine_entries_mask,
hr);
@@ -837,11 +837,11 @@
}
HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
HeapRegion* hr)
: _bosa(bosa),
- _m(Mutex::leaf, FormatBuffer<128>("HeapRegionRemSet lock #%u", hr->hrs_index()), true),
+ _m(Mutex::leaf, FormatBuffer<128>("HeapRegionRemSet lock #%u", hr->hrm_index()), true),
_code_roots(), _other_regions(hr, &_m), _iter_state(Unclaimed), _iter_claimed(0) {
reset_for_par_iteration();
}
void HeapRegionRemSet::setup_remset_size() {