hotspot/test/runtime/CompressedOops/CompressedClassPointers.java
changeset 22890 7ca31eb1a41f
parent 21188 d053e4e8f901
child 23184 060625af5ce9
--- a/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java	Tue Feb 18 09:54:24 2014 -0500
+++ b/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java	Wed Feb 19 02:58:13 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -80,6 +80,18 @@
         output.shouldHaveExitValue(0);
     }
 
+    public static void heapBaseMinAddressTest() throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-XX:HeapBaseMinAddress=1m",
+            "-XX:+PrintMiscellaneous",
+            "-XX:+Verbose",
+            "-version");
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("HeapBaseMinAddress must be at least");
+        output.shouldContain("HotSpot");
+        output.shouldHaveExitValue(0);
+    }
+
     public static void sharingTest() throws Exception {
         // Test small heaps
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
@@ -113,24 +125,25 @@
         }
     }
 
-  public static void main(String[] args) throws Exception {
-      if (!Platform.is64bit()) {
-          // Can't test this on 32 bit, just pass
-          System.out.println("Skipping test on 32bit");
-          return;
-      }
-      // Solaris 10 can't mmap compressed oops space without a base
-      if (Platform.isSolaris()) {
-           String name = System.getProperty("os.version");
-           if (name.equals("5.10")) {
-               System.out.println("Skipping test on Solaris 10");
-               return;
-           }
-      }
-      smallHeapTest();
-      smallHeapTestWith3G();
-      largeHeapTest();
-      largePagesTest();
-      sharingTest();
-  }
+    public static void main(String[] args) throws Exception {
+        if (!Platform.is64bit()) {
+            // Can't test this on 32 bit, just pass
+            System.out.println("Skipping test on 32bit");
+            return;
+        }
+        // Solaris 10 can't mmap compressed oops space without a base
+        if (Platform.isSolaris()) {
+             String name = System.getProperty("os.version");
+             if (name.equals("5.10")) {
+                 System.out.println("Skipping test on Solaris 10");
+                 return;
+             }
+        }
+        smallHeapTest();
+        smallHeapTestWith3G();
+        largeHeapTest();
+        largePagesTest();
+        heapBaseMinAddressTest();
+        sharingTest();
+    }
 }