8204173: Lower the minimum number of heap memory pools in MemoryTest.java

Reviewed-by: mchung, sjohanss
This commit is contained in:
Stefan Karlsson 2018-06-05 15:56:23 +02:00
parent ad35b3d424
commit fcfd260c1f
2 changed files with 16 additions and 9 deletions

View File

@ -29,7 +29,7 @@
* @author Mandy Chung
*
* @modules jdk.management
* @run main MemoryTest 2
* @run main MemoryTest 2 3
*/
/*
@ -65,17 +65,24 @@ public class MemoryTest {
// - Code cache (between one and three depending on the -XX:SegmentedCodeCache option)
// - Metaspace
// - Compressed Class Space (if compressed class pointers are used)
private static int[] expectedMinNumPools = {3, 2};
private static int[] expectedMaxNumPools = {3, 5};
private static int expectedNumGCMgrs = 2;
private static int expectedNumMgrs = expectedNumGCMgrs + 2;
private static int[] expectedMinNumPools = new int[2];
private static int[] expectedMaxNumPools = new int[2];
private static int expectedNumGCMgrs;
private static int expectedNumMgrs;
private static String[] types = { "heap", "non-heap" };
public static void main(String args[]) throws Exception {
Integer value = new Integer(args[0]);
expectedNumGCMgrs = value.intValue();
expectedNumGCMgrs = Integer.valueOf(args[0]);
expectedNumMgrs = expectedNumGCMgrs + 2;
int expectedNumPools = Integer.valueOf(args[1]);
expectedMinNumPools[HEAP] = expectedNumPools;
expectedMaxNumPools[HEAP] = expectedNumPools;
expectedMinNumPools[NONHEAP] = 2;
expectedMaxNumPools[NONHEAP] = 5;
checkMemoryPools();
checkMemoryManagers();
if (testFailed)

View File

@ -49,10 +49,10 @@ runOne()
}
# Test MemoryTest with default collector
runOne MemoryTest 2
runOne MemoryTest 2 3
# Test MemoryTest with parallel scavenger collector
runOne -XX:+UseParallelGC MemoryTest 2
runOne -XX:+UseParallelGC MemoryTest 2 3
exit 0