--- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp Tue May 07 12:32:19 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp Tue May 07 21:53:38 2019 +0200
@@ -619,6 +619,7 @@
guarantee(HumongousThresholdWords == 0, "we should only set it once");
HumongousThresholdWords = RegionSizeWords * ShenandoahHumongousThreshold / 100;
+ HumongousThresholdWords = align_down(HumongousThresholdWords, MinObjAlignment);
assert (HumongousThresholdWords <= RegionSizeWords, "sanity");
guarantee(HumongousThresholdBytes == 0, "we should only set it once");
@@ -643,13 +644,14 @@
//
// The whole thing is mitigated if Elastic TLABs are enabled.
//
+ guarantee(MaxTLABSizeWords == 0, "we should only set it once");
+ MaxTLABSizeWords = MIN2(ShenandoahElasticTLAB ? RegionSizeWords : (RegionSizeWords / 8), HumongousThresholdWords);
+ MaxTLABSizeWords = align_down(MaxTLABSizeWords, MinObjAlignment);
+
guarantee(MaxTLABSizeBytes == 0, "we should only set it once");
- MaxTLABSizeBytes = MIN2(ShenandoahElasticTLAB ? RegionSizeBytes : (RegionSizeBytes / 8), HumongousThresholdBytes);
+ MaxTLABSizeBytes = MaxTLABSizeWords * HeapWordSize;
assert (MaxTLABSizeBytes > MinTLABSize, "should be larger");
- guarantee(MaxTLABSizeWords == 0, "we should only set it once");
- MaxTLABSizeWords = MaxTLABSizeBytes / HeapWordSize;
-
log_info(gc, init)("Regions: " SIZE_FORMAT " x " SIZE_FORMAT "%s",
RegionCount, byte_size_in_proper_unit(RegionSizeBytes), proper_unit_for_byte_size(RegionSizeBytes));
log_info(gc, init)("Humongous object threshold: " SIZE_FORMAT "%s",