--- a/src/hotspot/share/gc/g1/heapRegion.cpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/gc/g1/heapRegion.cpp Thu Oct 17 20:53:35 2019 +0100
@@ -49,6 +49,7 @@
int HeapRegion::LogOfHRGrainBytes = 0;
int HeapRegion::LogOfHRGrainWords = 0;
+int HeapRegion::LogCardsPerRegion = 0;
size_t HeapRegion::GrainBytes = 0;
size_t HeapRegion::GrainWords = 0;
size_t HeapRegion::CardsPerRegion = 0;
@@ -105,6 +106,8 @@
guarantee(CardsPerRegion == 0, "we should only set it once");
CardsPerRegion = GrainBytes >> G1CardTable::card_shift;
+ LogCardsPerRegion = log2_long((jlong) CardsPerRegion);
+
if (G1HeapRegionSize != GrainBytes) {
FLAG_SET_ERGO(G1HeapRegionSize, GrainBytes);
}
@@ -116,7 +119,7 @@
assert(!in_collection_set(),
"Should not clear heap region %u in the collection set", hrm_index());
- set_young_index_in_cset(-1);
+ clear_young_index_in_cset();
clear_index_in_opt_cset();
uninstall_surv_rate_group();
set_free();