8027924: gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java fails with warning
authorehelin
Wed, 26 Mar 2014 16:33:13 +0100
changeset 23509 08e26f93c9a5
parent 23508 3b15250ea28f
child 23510 9df17c84dacc
child 23535 6306204d22a9
8027924: gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java fails with warning Reviewed-by: jmasa, tschatzl
hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
--- a/hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java	Thu Mar 06 09:08:18 2014 +0100
+++ b/hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java	Wed Mar 26 16:33:13 2014 +0100
@@ -26,7 +26,7 @@
  * @bug 8004924
  * @summary Checks that jmap -heap contains the flag CompressedClassSpaceSize
  * @library /testlibrary
- * @run main/othervm -XX:CompressedClassSpaceSize=50m CompressedClassSpaceSizeInJmapHeap
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=50m CompressedClassSpaceSizeInJmapHeap
  */
 
 import com.oracle.java.testlibrary.*;
@@ -37,6 +37,11 @@
 
 public class CompressedClassSpaceSizeInJmapHeap {
     public static void main(String[] args) throws Exception {
+        if (!Platform.is64bit()) {
+            // Compressed Class Space is only available on 64-bit JVMs
+            return;
+        }
+
         String pid = Integer.toString(ProcessTools.getProcessId());
 
         JDKToolLauncher jmap = JDKToolLauncher.create("jmap")