8200365: TestOptionsWithRanges.java of '-XX:TLABWasteTargetPercent=100' fails intermittently
authortschatzl
Mon, 13 Aug 2018 12:24:25 +0200
changeset 51385 be775229d3b3
parent 51384 677e21d875ae
child 51386 aed534740851
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
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();