< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page
@@ -3151,10 +3151,30 @@
  
  #ifndef CAN_SHOW_REGISTERS_ON_ASSERT
    UNSUPPORTED_OPTION(ShowRegistersOnAssert);
  #endif // CAN_SHOW_REGISTERS_ON_ASSERT
  
+ #ifdef _LP64
+   if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
+     // If user specifies -UseCompressedClassPointers, disable compact headers with a warning.
+     warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
+     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
+   }
+   if (UseCompactObjectHeaders) {
+     if (!UseFastLocking) {
+       // Lilliput requires fast-locking.
+       FLAG_SET_DEFAULT(UseFastLocking, true);
+     }
+     if (UseBiasedLocking) {
+       FLAG_SET_DEFAULT(UseBiasedLocking, false);
+     }
+   }
+   if (!UseCompactObjectHeaders) {
+     FLAG_SET_DEFAULT(UseSharedSpaces, false);
+   }
+ #endif
+ 
    return JNI_OK;
  }
  
  // Helper class for controlling the lifetime of JavaVMInitArgs
  // objects.  The contents of the JavaVMInitArgs are guaranteed to be
< prev index next >