# HG changeset patch # User tschatzl # Date 1534155865 -7200 # Node ID be775229d3b330f72b3c9b0b6a5adadf487b1542 # Parent 677e21d875aeb2b426c0ccfc3c3f7d8a58f65be2 8200365: TestOptionsWithRanges.java of '-XX:TLABWasteTargetPercent=100' fails intermittently Summary: For initial TLAB sizing, increase the number of expected refills to 2. Reviewed-by: phh, sangheki diff -r 677e21d875ae -r be775229d3b3 src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp --- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp Mon Aug 13 12:24:25 2018 +0200 +++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp Mon Aug 13 12:24:25 2018 +0200 @@ -226,7 +226,9 @@ // Assuming each thread's active tlab is, on average, // 1/2 full at a GC _target_refills = 100 / (2 * TLABWasteTargetPercent); - _target_refills = MAX2(_target_refills, (unsigned)1U); + // We need to set initial target refills to 2 to avoid a GC which causes VM + // abort during VM initialization. + _target_refills = MAX2(_target_refills, 2U); _global_stats = new GlobalTLABStats();