@@ -72,7 +72,7 @@ public class TestPLABPromotion {
72
72
private static final int PLAB_SIZE_HIGH = 65536 ;
73
73
private static final int OBJECT_SIZE_SMALL = 10 ;
74
74
private static final int OBJECT_SIZE_MEDIUM = 100 ;
75
- private static final int OBJECT_SIZE_HIGH = 3500 ;
75
+ private static final int OBJECT_SIZE_HIGH = 3250 ;
76
76
private static final int GC_NUM_SMALL = 1 ;
77
77
private static final int GC_NUM_MEDIUM = 3 ;
78
78
private static final int GC_NUM_HIGH = 7 ;
@@ -222,7 +222,7 @@ private static void checkFields(PlabInfo info) {
222
222
* @return true if checkedValue is less than MEM_DIFFERENCE_PCT percent of controlValue
223
223
*/
224
224
private static boolean checkRatio (long checkedValue , long controlValue ) {
225
- return ( Math .abs (checkedValue ) / controlValue ) * 100L < MEM_DIFFERENCE_PCT ;
225
+ return Math .abs (checkedValue * 100.0 / controlValue ) < MEM_DIFFERENCE_PCT ;
226
226
}
227
227
228
228
/**
@@ -235,7 +235,7 @@ private static boolean checkRatio(long checkedValue, long controlValue) {
235
235
* MEM_DIFFERENCE_PCT percent of controlValue
236
236
*/
237
237
private static boolean checkDifferenceRatio (long checkedValue , long controlValue ) {
238
- return ( Math .abs (checkedValue - controlValue ) / controlValue ) * 100L < MEM_DIFFERENCE_PCT ;
238
+ return Math .abs (( checkedValue - controlValue ) * 100.0 / controlValue ) < MEM_DIFFERENCE_PCT ;
239
239
}
240
240
241
241
/**
@@ -304,6 +304,7 @@ public TestCase(int wastePct,
304
304
public List <String > toOptions () {
305
305
return Arrays .asList ("-XX:ParallelGCThreads=" + parGCThreads ,
306
306
"-XX:ParallelGCBufferWastePct=" + wastePct ,
307
+ "-XX:ParallelGCThreads=1" , // Avoid dynamic sizing of threads.
307
308
"-XX:OldPLABSize=" + plabSize ,
308
309
"-XX:YoungPLABSize=" + plabSize ,
309
310
"-XX:" + (plabIsFixed ? "-" : "+" ) + "ResizePLAB" ,
0 commit comments