1.1 --- a/src/share/vm/memory/metaspace.cpp Fri Sep 06 11:11:19 2013 -0700 1.2 +++ b/src/share/vm/memory/metaspace.cpp Mon Aug 12 17:37:02 2013 +0200 1.3 @@ -423,7 +423,7 @@ 1.4 // Can this virtual list allocate >1 spaces? Also, used to determine 1.5 // whether to allocate unlimited small chunks in this virtual space 1.6 bool _is_class; 1.7 - bool can_grow() const { return !is_class() || !UseCompressedKlassPointers; } 1.8 + bool can_grow() const { return !is_class() || !UseCompressedClassPointers; } 1.9 1.10 // Sum of space in all virtual spaces and number of virtual spaces 1.11 size_t _virtual_space_total; 1.12 @@ -2836,7 +2836,7 @@ 1.13 // to work with compressed klass pointers. 1.14 bool Metaspace::can_use_cds_with_metaspace_addr(char* metaspace_base, address cds_base) { 1.15 assert(cds_base != 0 && UseSharedSpaces, "Only use with CDS"); 1.16 - assert(UseCompressedKlassPointers, "Only use with CompressedKlassPtrs"); 1.17 + assert(UseCompressedClassPointers, "Only use with CompressedKlassPtrs"); 1.18 address lower_base = MIN2((address)metaspace_base, cds_base); 1.19 address higher_address = MAX2((address)(cds_base + FileMapInfo::shared_spaces_size()), 1.20 (address)(metaspace_base + class_metaspace_size())); 1.21 @@ -2846,7 +2846,7 @@ 1.22 // Try to allocate the metaspace at the requested addr. 1.23 void Metaspace::allocate_metaspace_compressed_klass_ptrs(char* requested_addr, address cds_base) { 1.24 assert(using_class_space(), "called improperly"); 1.25 - assert(UseCompressedKlassPointers, "Only use with CompressedKlassPtrs"); 1.26 + assert(UseCompressedClassPointers, "Only use with CompressedKlassPtrs"); 1.27 assert(class_metaspace_size() < KlassEncodingMetaspaceMax, 1.28 "Metaspace size is too big"); 1.29 1.30 @@ -2869,9 +2869,9 @@ 1.31 1.32 // If no successful allocation then try to allocate the space anywhere. If 1.33 // that fails then OOM doom. At this point we cannot try allocating the 1.34 - // metaspace as if UseCompressedKlassPointers is off because too much 1.35 - // initialization has happened that depends on UseCompressedKlassPointers. 1.36 - // So, UseCompressedKlassPointers cannot be turned off at this point. 1.37 + // metaspace as if UseCompressedClassPointers is off because too much 1.38 + // initialization has happened that depends on UseCompressedClassPointers. 1.39 + // So, UseCompressedClassPointers cannot be turned off at this point. 1.40 if (!metaspace_rs.is_reserved()) { 1.41 metaspace_rs = ReservedSpace(class_metaspace_size(), 1.42 os::vm_allocation_granularity(), false); 1.43 @@ -2904,12 +2904,12 @@ 1.44 } 1.45 } 1.46 1.47 -// For UseCompressedKlassPointers the class space is reserved above the top of 1.48 +// For UseCompressedClassPointers the class space is reserved above the top of 1.49 // the Java heap. The argument passed in is at the base of the compressed space. 1.50 void Metaspace::initialize_class_space(ReservedSpace rs) { 1.51 // The reserved space size may be bigger because of alignment, esp with UseLargePages 1.52 - assert(rs.size() >= ClassMetaspaceSize, 1.53 - err_msg(SIZE_FORMAT " != " UINTX_FORMAT, rs.size(), ClassMetaspaceSize)); 1.54 + assert(rs.size() >= CompressedClassSpaceSize, 1.55 + err_msg(SIZE_FORMAT " != " UINTX_FORMAT, rs.size(), CompressedClassSpaceSize)); 1.56 assert(using_class_space(), "Must be using class space"); 1.57 _class_space_list = new VirtualSpaceList(rs); 1.58 } 1.59 @@ -2921,7 +2921,7 @@ 1.60 int max_alignment = os::vm_page_size(); 1.61 size_t cds_total = 0; 1.62 1.63 - set_class_metaspace_size(align_size_up(ClassMetaspaceSize, 1.64 + set_class_metaspace_size(align_size_up(CompressedClassSpaceSize, 1.65 os::vm_allocation_granularity())); 1.66 1.67 MetaspaceShared::set_max_alignment(max_alignment); 1.68 @@ -2941,8 +2941,8 @@ 1.69 #ifdef _LP64 1.70 // Set the compressed klass pointer base so that decoding of these pointers works 1.71 // properly when creating the shared archive. 1.72 - assert(UseCompressedOops && UseCompressedKlassPointers, 1.73 - "UseCompressedOops and UseCompressedKlassPointers must be set"); 1.74 + assert(UseCompressedOops && UseCompressedClassPointers, 1.75 + "UseCompressedOops and UseCompressedClassPointers must be set"); 1.76 Universe::set_narrow_klass_base((address)_space_list->current_virtual_space()->bottom()); 1.77 if (TraceMetavirtualspaceAllocation && Verbose) { 1.78 gclog_or_tty->print_cr("Setting_narrow_klass_base to Address: " PTR_FORMAT, 1.79 @@ -2979,7 +2979,7 @@ 1.80 } 1.81 1.82 #ifdef _LP64 1.83 - // If UseCompressedKlassPointers is set then allocate the metaspace area 1.84 + // If UseCompressedClassPointers is set then allocate the metaspace area 1.85 // above the heap and above the CDS area (if it exists). 1.86 if (using_class_space()) { 1.87 if (UseSharedSpaces) { 1.88 @@ -2997,7 +2997,7 @@ 1.89 // on the medium chunk list. The next chunk will be small and progress 1.90 // from there. This size calculated by -version. 1.91 _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6, 1.92 - (ClassMetaspaceSize/BytesPerWord)*2); 1.93 + (CompressedClassSpaceSize/BytesPerWord)*2); 1.94 _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size); 1.95 // Arbitrarily set the initial virtual space to a multiple 1.96 // of the boot class loader size. 1.97 @@ -3064,7 +3064,7 @@ 1.98 1.99 MetaWord* Metaspace::allocate(size_t word_size, MetadataType mdtype) { 1.100 // DumpSharedSpaces doesn't use class metadata area (yet) 1.101 - // Also, don't use class_vsm() unless UseCompressedKlassPointers is true. 1.102 + // Also, don't use class_vsm() unless UseCompressedClassPointers is true. 1.103 if (mdtype == ClassType && using_class_space()) { 1.104 return class_vsm()->allocate(word_size); 1.105 } else { 1.106 @@ -3213,7 +3213,7 @@ 1.107 MetaspaceAux::dump(gclog_or_tty); 1.108 } 1.109 // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support 1.110 - const char* space_string = (mdtype == ClassType) ? "Class Metadata space" : 1.111 + const char* space_string = (mdtype == ClassType) ? "Compressed class space" : 1.112 "Metadata space"; 1.113 report_java_out_of_memory(space_string); 1.114