changeset 5284:719e886d4f72

Merge
author tschatzl
date Wed, 18 Sep 2013 15:59:41 +0200
parents 73d0d0218068 9044964f9163
children 06ae47d9d088 2c022e432e10
files
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp	Tue Sep 17 20:59:07 2013 +0200
+++ b/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp	Wed Sep 18 15:59:41 2013 +0200
@@ -35,7 +35,9 @@
 
 // Used on 64 bit platforms for UseCompressedOops base address
 #ifdef _LP64
-define_pd_global(uintx, HeapBaseMinAddress,      CONST64(4)*G);
+// use 6G as default base address because by default the OS maps the application
+// to 4G on Solaris-Sparc. This leaves at least 2G for the native heap.
+define_pd_global(uintx, HeapBaseMinAddress,      CONST64(6)*G);
 #else
 define_pd_global(uintx, HeapBaseMinAddress,      2*G);
 #endif
--- a/test/gc/arguments/TestUseCompressedOopsErgoTools.java	Tue Sep 17 20:59:07 2013 +0200
+++ b/test/gc/arguments/TestUseCompressedOopsErgoTools.java	Wed Sep 18 15:59:41 2013 +0200
@@ -42,10 +42,10 @@
 
 class TestUseCompressedOopsErgoTools {
 
-  private static long getClassMetaspaceSize() {
+  private static long getCompressedClassSpaceSize() {
     HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean();
 
-    VMOption option = diagnostic.getVMOption("ClassMetaspaceSize");
+    VMOption option = diagnostic.getVMOption("CompressedClassSpaceSize");
     return Long.parseLong(option.getValue());
   }
 
@@ -132,13 +132,13 @@
     checkUseCompressedOops(join(gcflags, "-XX:ObjectAlignmentInBytes=16"), maxHeapForCompressedOops - 1, true);
     checkUseCompressedOops(join(gcflags, "-XX:ObjectAlignmentInBytes=16"), maxHeapForCompressedOops + 1, false);
 
-    // use a different ClassMetaspaceSize
-    String classMetaspaceSizeArg = "-XX:ClassMetaspaceSize=" + 2 * getClassMetaspaceSize();
-    maxHeapForCompressedOops = getMaxHeapForCompressedOops(join(gcflags, classMetaspaceSizeArg));
+    // use a different CompressedClassSpaceSize
+    String compressedClassSpaceSizeArg = "-XX:CompressedClassSpaceSize=" + 2 * getCompressedClassSpaceSize();
+    maxHeapForCompressedOops = getMaxHeapForCompressedOops(join(gcflags, compressedClassSpaceSizeArg));
 
-    checkUseCompressedOops(join(gcflags, classMetaspaceSizeArg), maxHeapForCompressedOops, true);
-    checkUseCompressedOops(join(gcflags, classMetaspaceSizeArg), maxHeapForCompressedOops - 1, true);
-    checkUseCompressedOops(join(gcflags, classMetaspaceSizeArg), maxHeapForCompressedOops + 1, false);
+    checkUseCompressedOops(join(gcflags, compressedClassSpaceSizeArg), maxHeapForCompressedOops, true);
+    checkUseCompressedOops(join(gcflags, compressedClassSpaceSizeArg), maxHeapForCompressedOops - 1, true);
+    checkUseCompressedOops(join(gcflags, compressedClassSpaceSizeArg), maxHeapForCompressedOops + 1, false);
   }
 
   private static void checkUseCompressedOops(String[] args, long heapsize, boolean expectUseCompressedOops) throws Exception {
@@ -152,9 +152,7 @@
 
      boolean actualUseCompressedOops = getFlagBoolValue(" UseCompressedOops", output);
 
-     if (expectUseCompressedOops != actualUseCompressedOops) {
-       throw new RuntimeException("Expected use of compressed oops: " + expectUseCompressedOops + " but was: " + actualUseCompressedOops);
-     }
+     Asserts.assertEQ(expectUseCompressedOops, actualUseCompressedOops);
   }
 
   private static boolean getFlagBoolValue(String flag, String where) {
@@ -162,7 +160,7 @@
     if (!m.find()) {
       throw new RuntimeException("Could not find value for flag " + flag + " in output string");
     }
-    String match = m.group(1).equals("true");
+    return m.group(1).equals("true");
   }
 
   private static String expect(String[] flags, boolean hasWarning, boolean hasError, int errorcode) throws Exception {