8003424: Enable Class Data Sharing for CompressedOops

8016729: ObjectAlignmentInBytes=16 now forces the use of heap based compressed oops
8005933: The -Xshare:auto option is ignored for -server

Move klass metaspace above the heap and support CDS with compressed klass ptrs.

Reviewed-by: coleenp, kvn, mgerdin, tschatzl, stefank
This commit is contained in:
Harold Seigel 2013-08-15 20:04:10 -04:00
parent 9d372e7801
commit 4d91f4e69d
34 changed files with 876 additions and 552 deletions

View file

@ -75,10 +75,10 @@ class LatestMethodCache : public CHeapObj<mtClass> {
};
// For UseCompressedOops and UseCompressedKlassPointers.
// For UseCompressedOops.
struct NarrowPtrStruct {
// Base address for oop/klass-within-java-object materialization.
// NULL if using wide oops/klasses or zero based narrow oops/klasses.
// Base address for oop-within-java-object materialization.
// NULL if using wide oops or zero based narrow oops.
address _base;
// Number of shift bits for encoding/decoding narrow ptrs.
// 0 if using wide ptrs or zero based unscaled narrow ptrs,
@ -106,6 +106,7 @@ class Universe: AllStatic {
friend class SystemDictionary;
friend class VMStructs;
friend class VM_PopulateDumpSharedSpace;
friend class Metaspace;
friend jint universe_init();
friend void universe2_init();
@ -184,9 +185,6 @@ class Universe: AllStatic {
static struct NarrowPtrStruct _narrow_klass;
static address _narrow_ptrs_base;
// Aligned size of the metaspace.
static size_t _class_metaspace_size;
// array of dummy objects used with +FullGCAlot
debug_only(static objArrayOop _fullgc_alot_dummy_array;)
// index of next entry to clear
@ -238,15 +236,6 @@ class Universe: AllStatic {
assert(UseCompressedOops, "no compressed ptrs?");
_narrow_oop._use_implicit_null_checks = use;
}
static bool reserve_metaspace_helper(bool with_base = false);
static ReservedHeapSpace reserve_heap_metaspace(size_t heap_size, size_t alignment, bool& contiguous);
static size_t class_metaspace_size() {
return _class_metaspace_size;
}
static void set_class_metaspace_size(size_t metaspace_size) {
_class_metaspace_size = metaspace_size;
}
// Debugging
static int _verify_count; // number of verifies done