--- a/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp Thu Jun 27 03:33:44 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp Thu Jun 27 11:48:32 2019 +0200
@@ -163,10 +163,14 @@
return _region_attr.is_in_cset_or_humongous((HeapWord*)obj);
}
-G1HeapRegionAttr G1CollectedHeap::region_attr(const void* addr) {
+G1HeapRegionAttr G1CollectedHeap::region_attr(const void* addr) const {
return _region_attr.at((HeapWord*)addr);
}
+G1HeapRegionAttr G1CollectedHeap::region_attr(uint idx) const {
+ return _region_attr.get_by_index(idx);
+}
+
void G1CollectedHeap::register_humongous_region_with_region_attr(uint index) {
_region_attr.set_humongous(index, region_at(index)->rem_set()->is_tracked());
}
@@ -177,7 +181,7 @@
void G1CollectedHeap::register_old_region_with_region_attr(HeapRegion* r) {
_region_attr.set_in_old(r->hrm_index(), r->rem_set()->is_tracked());
- _rem_set->prepare_for_scan_rem_set(r->hrm_index());
+ _rem_set->prepare_for_scan_heap_roots(r->hrm_index());
}
void G1CollectedHeap::register_optional_region_with_region_attr(HeapRegion* r) {