--- a/src/hotspot/share/gc/g1/heapRegion.cpp Thu Jun 27 03:33:44 2019 +0200
+++ b/src/hotspot/share/gc/g1/heapRegion.cpp Thu Jun 27 11:48:32 2019 +0200
@@ -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);
}