< prev index next > src/hotspot/share/runtime/arguments.cpp
Print this page
}
}
#endif // _LP64
}
- void Arguments::set_use_compressed_klass_ptrs() {
- #ifdef _LP64
- assert(!UseCompressedClassPointers || CompressedClassSpaceSize <= KlassEncodingMetaspaceMax,
- "CompressedClassSpaceSize is too large for UseCompressedClassPointers");
- #endif // _LP64
- }
-
void Arguments::set_conservative_max_heap_alignment() {
// The conservative maximum required alignment for the heap is the maximum of
// the alignments imposed by several sources: any requirements from the heap
// itself and the maximum page size we may run the VM with.
size_t heap_alignment = GCConfig::arguments()->conservative_max_heap_alignment();
set_conservative_max_heap_alignment();
#ifdef _LP64
set_use_compressed_oops();
- set_use_compressed_klass_ptrs();
// Also checks that certain machines are slower with compressed oops
// in vm_version initialization code.
#endif // _LP64
FLAG_SET_CMDLINE(StackReservedPages, 0);
warning("Reserved Stack Area not supported on this platform");
}
#endif
! #if !defined(X86) && !defined(AARCH64) && !defined(RISCV64) && !defined(ARM) && !defined(PPC64) && !defined(S390)
if (LockingMode == LM_LIGHTWEIGHT) {
FLAG_SET_CMDLINE(LockingMode, LM_LEGACY);
warning("New lightweight locking not supported on this platform");
}
#endif
FLAG_SET_CMDLINE(StackReservedPages, 0);
warning("Reserved Stack Area not supported on this platform");
}
#endif
! #if !defined(X86) && !defined(AARCH64)
if (LockingMode == LM_LIGHTWEIGHT) {
FLAG_SET_CMDLINE(LockingMode, LM_LEGACY);
warning("New lightweight locking not supported on this platform");
}
#endif
#ifndef CAN_SHOW_REGISTERS_ON_ASSERT
UNSUPPORTED_OPTION(ShowRegistersOnAssert);
#endif // CAN_SHOW_REGISTERS_ON_ASSERT
+ #ifdef _LP64
+ if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
+ warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
+ FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
+ }
+ if (UseCompactObjectHeaders && LockingMode != LM_LIGHTWEIGHT) {
+ FLAG_SET_DEFAULT(LockingMode, LM_LIGHTWEIGHT);
+ }
+ if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
+ FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
+ }
+ #endif
+
return JNI_OK;
}
// Helper class for controlling the lifetime of JavaVMInitArgs
// objects. The contents of the JavaVMInitArgs are guaranteed to be
// Set heap size based on available physical memory
set_heap_size();
GCConfig::arguments()->initialize();
+ if (UseCompressedClassPointers) {
+ CompressedKlassPointers::pre_initialize();
+ }
+
CDSConfig::initialize();
// Initialize Metaspace flags and alignments
Metaspace::ergo_initialize();
< prev index next >