8010734: NPG: The test MemoryTest.java needs to be updated to support metaspace
authorehelin
Mon, 08 Jul 2013 11:30:44 +0200
changeset 18785 92a4cdaeca0f
parent 18784 7f517475eeb4
child 18786 52a2658627c2
child 18811 6a7dc4611ff2
8010734: NPG: The test MemoryTest.java needs to be updated to support metaspace Reviewed-by: alanb
jdk/test/ProblemList.txt
jdk/test/java/lang/management/MemoryMXBean/MemoryTest.java
--- a/jdk/test/ProblemList.txt	Fri Jul 05 18:22:58 2013 -0700
+++ b/jdk/test/ProblemList.txt	Mon Jul 08 11:30:44 2013 +0200
@@ -137,10 +137,6 @@
 # 8015780
 java/lang/reflect/Method/GenericStringTest.java			generic-all
 
-# 8019500
-java/lang/management/MemoryMXBean/MemoryTestAllGC.sh            generic-all
-java/lang/management/MemoryMXBean/MemoryTest.java               generic-all
-
 ############################################################################
 
 # jdk_management
--- a/jdk/test/java/lang/management/MemoryMXBean/MemoryTest.java	Fri Jul 05 18:22:58 2013 -0700
+++ b/jdk/test/java/lang/management/MemoryMXBean/MemoryTest.java	Mon Jul 08 11:30:44 2013 +0200
@@ -59,18 +59,21 @@
     // (or equivalent for other collectors)
     // Number of GC memory managers = 2
 
-    // Hotspot VM 1.8+ after perm gen removal is expected to have only
-    // one non-heap memory pool
-    private static int[] expectedMinNumPools = {3, 1};
-    private static int[] expectedMaxNumPools = {3, 1};
+    // Hotspot VM 1.8+ after perm gen removal is expected to have two or
+    // three non-heap memory pools:
+    // - Code cache
+    // - Metaspace
+    // - Compressed Class Space (if compressed class pointers are used)
+    private static int[] expectedMinNumPools = {3, 2};
+    private static int[] expectedMaxNumPools = {3, 3};
     private static int expectedNumGCMgrs = 2;
-    private static int expectedNumMgrs = expectedNumGCMgrs + 1;
+    private static int expectedNumMgrs = expectedNumGCMgrs + 2;
     private static String[] types = { "heap", "non-heap" };
 
     public static void main(String args[]) throws Exception {
         Integer value = new Integer(args[0]);
         expectedNumGCMgrs = value.intValue();
-        expectedNumMgrs = expectedNumGCMgrs + 1;
+        expectedNumMgrs = expectedNumGCMgrs + 2;
 
         checkMemoryPools();
         checkMemoryManagers();