hotspot/test/runtime/CompressedOops/UseCompressedOops.java
changeset 26813 fd74c05c4a7e
parent 26688 bb0cdd873e51
child 28372 ce0aad4b8c44
--- a/hotspot/test/runtime/CompressedOops/UseCompressedOops.java	Tue Sep 16 12:13:13 2014 +0200
+++ b/hotspot/test/runtime/CompressedOops/UseCompressedOops.java	Wed Sep 17 06:55:12 2014 -0700
@@ -52,18 +52,17 @@
                 .shouldContain("Compressed Oops mode")
                 .shouldHaveExitValue(0);
 
-            // Larger than 4gb heap should result in zero based with shift 3
-            testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g")
-                .shouldContain("Zero based")
-                .shouldContain("Oop shift amount: 3")
-                .shouldHaveExitValue(0);
+            // Skip the following three test cases if we're on OSX or Solaris.
+            //
+            // OSX doesn't seem to care about HeapBaseMinAddress and Solaris
+            // puts the heap way up, forcing different behaviour.
+            if (!Platform.isOSX() && !Platform.isSolaris()) {
+                // Larger than 4gb heap should result in zero based with shift 3
+                testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g")
+                    .shouldContain("Zero based")
+                    .shouldContain("Oop shift amount: 3")
+                    .shouldHaveExitValue(0);
 
-            // Skip the following three test cases if we're on OSX or Solaris Sparc.
-            //
-            // OSX doesn't seem to care about HeapBaseMinAddress and Solaris Sparc
-            // puts the heap way up, forcing different behaviour.
-
-            if (!Platform.isOSX() && !(Platform.isSolaris() && Platform.isSparc())) {
                 // Small heap above 4gb should result in zero based with shift 3
                 testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m", "-XX:HeapBaseMinAddress=4g")
                     .shouldContain("Zero based")
@@ -83,6 +82,12 @@
                     .shouldContain("Non-zero based")
                     .shouldContain("Oop shift amount: 4")
                     .shouldHaveExitValue(0);
+
+                // 32gb heap with object alignment set to 16 bytes should result in zero based with shift 4
+                testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16")
+                    .shouldContain("Zero based")
+                    .shouldContain("Oop shift amount: 4")
+                    .shouldHaveExitValue(0);
             }
 
             // Explicitly enabling compressed oops with 32gb heap should result a warning
@@ -106,12 +111,6 @@
                 .shouldContain("Max heap size too large for Compressed Oops")
                 .shouldHaveExitValue(0);
 
-            // 32gb heap with object alignment set to 16 bytes should result in zero based with shift 4
-            testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16")
-                .shouldContain("Zero based")
-                .shouldContain("Oop shift amount: 4")
-                .shouldHaveExitValue(0);
-
         } else {
             // Compressed oops should only apply to 64bit platforms
             testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m")