8200365: TestOptionsWithRanges.java of '-XX:TLABWasteTargetPercent=100' fails intermittently

For initial TLAB sizing, increase the number of expected refills to 2.

Reviewed-by: phh, sangheki
This commit is contained in:
Thomas Schatzl 2018-08-13 12:24:25 +02:00
parent 044b502383
commit 7aabcdee63

@ -226,7 +226,9 @@ void ThreadLocalAllocBuffer::startup_initialization() {
// 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();