Mon, 12 Aug 2013 17:37:02 +0200
8015107: NPG: Use consistent naming for metaspace concepts
Reviewed-by: coleenp, mgerdin, hseigel
1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Fri Sep 06 11:11:19 2013 -0700 1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Mon Aug 12 17:37:02 2013 +0200 1.3 @@ -792,7 +792,7 @@ 1.4 1.5 public boolean isCompressedKlassPointersEnabled() { 1.6 if (compressedKlassPointersEnabled == null) { 1.7 - Flag flag = getCommandLineFlag("UseCompressedKlassPointers"); 1.8 + Flag flag = getCommandLineFlag("UseCompressedClassPointers"); 1.9 compressedKlassPointersEnabled = (flag == null) ? Boolean.FALSE: 1.10 (flag.getBool()? Boolean.TRUE: Boolean.FALSE); 1.11 }
2.1 --- a/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Fri Sep 06 11:11:19 2013 -0700 2.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Mon Aug 12 17:37:02 2013 +0200 2.3 @@ -66,18 +66,18 @@ 2.4 printGCAlgorithm(flagMap); 2.5 System.out.println(); 2.6 System.out.println("Heap Configuration:"); 2.7 - printValue("MinHeapFreeRatio = ", getFlagValue("MinHeapFreeRatio", flagMap)); 2.8 - printValue("MaxHeapFreeRatio = ", getFlagValue("MaxHeapFreeRatio", flagMap)); 2.9 - printValMB("MaxHeapSize = ", getFlagValue("MaxHeapSize", flagMap)); 2.10 - printValMB("NewSize = ", getFlagValue("NewSize", flagMap)); 2.11 - printValMB("MaxNewSize = ", getFlagValue("MaxNewSize", flagMap)); 2.12 - printValMB("OldSize = ", getFlagValue("OldSize", flagMap)); 2.13 - printValue("NewRatio = ", getFlagValue("NewRatio", flagMap)); 2.14 - printValue("SurvivorRatio = ", getFlagValue("SurvivorRatio", flagMap)); 2.15 - printValMB("MetaspaceSize = ", getFlagValue("MetaspaceSize", flagMap)); 2.16 - printValMB("ClassMetaspaceSize = ", getFlagValue("ClassMetaspaceSize", flagMap)); 2.17 - printValMB("MaxMetaspaceSize = ", getFlagValue("MaxMetaspaceSize", flagMap)); 2.18 - printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes()); 2.19 + printValue("MinHeapFreeRatio = ", getFlagValue("MinHeapFreeRatio", flagMap)); 2.20 + printValue("MaxHeapFreeRatio = ", getFlagValue("MaxHeapFreeRatio", flagMap)); 2.21 + printValMB("MaxHeapSize = ", getFlagValue("MaxHeapSize", flagMap)); 2.22 + printValMB("NewSize = ", getFlagValue("NewSize", flagMap)); 2.23 + printValMB("MaxNewSize = ", getFlagValue("MaxNewSize", flagMap)); 2.24 + printValMB("OldSize = ", getFlagValue("OldSize", flagMap)); 2.25 + printValue("NewRatio = ", getFlagValue("NewRatio", flagMap)); 2.26 + printValue("SurvivorRatio = ", getFlagValue("SurvivorRatio", flagMap)); 2.27 + printValMB("MetaspaceSize = ", getFlagValue("MetaspaceSize", flagMap)); 2.28 + printValMB("CompressedClassSpaceSize = ", getFlagValue("CompressedClassSpaceSize", flagMap)); 2.29 + printValMB("MaxMetaspaceSize = ", getFlagValue("MaxMetaspaceSize", flagMap)); 2.30 + printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes()); 2.31 2.32 System.out.println(); 2.33 System.out.println("Heap Usage:");
3.1 --- a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Fri Sep 06 11:11:19 2013 -0700 3.2 +++ b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Mon Aug 12 17:37:02 2013 +0200 3.3 @@ -105,7 +105,7 @@ 3.4 if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false; 3.5 } 3.6 3.7 - if (UseCompressedKlassPointers) { 3.8 + if (UseCompressedClassPointers) { 3.9 if (src->is_address() && !src->is_stack() && src->type() == T_ADDRESS && 3.10 src->as_address_ptr()->disp() == oopDesc::klass_offset_in_bytes()) return false; 3.11 } 3.12 @@ -963,7 +963,7 @@ 3.13 case T_METADATA: __ ld_ptr(base, offset, to_reg->as_register()); break; 3.14 case T_ADDRESS: 3.15 #ifdef _LP64 3.16 - if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedKlassPointers) { 3.17 + if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedClassPointers) { 3.18 __ lduw(base, offset, to_reg->as_register()); 3.19 __ decode_klass_not_null(to_reg->as_register()); 3.20 } else 3.21 @@ -2208,7 +2208,7 @@ 3.22 // We don't know the array types are compatible 3.23 if (basic_type != T_OBJECT) { 3.24 // Simple test for basic type arrays 3.25 - if (UseCompressedKlassPointers) { 3.26 + if (UseCompressedClassPointers) { 3.27 // We don't need decode because we just need to compare 3.28 __ lduw(src, oopDesc::klass_offset_in_bytes(), tmp); 3.29 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); 3.30 @@ -2342,7 +2342,7 @@ 3.31 // but not necessarily exactly of type default_type. 3.32 Label known_ok, halt; 3.33 metadata2reg(op->expected_type()->constant_encoding(), tmp); 3.34 - if (UseCompressedKlassPointers) { 3.35 + if (UseCompressedClassPointers) { 3.36 // tmp holds the default type. It currently comes uncompressed after the 3.37 // load of a constant, so encode it. 3.38 __ encode_klass_not_null(tmp);
4.1 --- a/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp Fri Sep 06 11:11:19 2013 -0700 4.2 +++ b/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp Mon Aug 12 17:37:02 2013 +0200 4.3 @@ -186,7 +186,7 @@ 4.4 set((intx)markOopDesc::prototype(), t1); 4.5 } 4.6 st_ptr(t1, obj, oopDesc::mark_offset_in_bytes()); 4.7 - if (UseCompressedKlassPointers) { 4.8 + if (UseCompressedClassPointers) { 4.9 // Save klass 4.10 mov(klass, t1); 4.11 encode_klass_not_null(t1); 4.12 @@ -196,7 +196,7 @@ 4.13 } 4.14 if (len->is_valid()) { 4.15 st(len, obj, arrayOopDesc::length_offset_in_bytes()); 4.16 - } else if (UseCompressedKlassPointers) { 4.17 + } else if (UseCompressedClassPointers) { 4.18 // otherwise length is in the class gap 4.19 store_klass_gap(G0, obj); 4.20 }
5.1 --- a/src/cpu/sparc/vm/macroAssembler_sparc.cpp Fri Sep 06 11:11:19 2013 -0700 5.2 +++ b/src/cpu/sparc/vm/macroAssembler_sparc.cpp Mon Aug 12 17:37:02 2013 +0200 5.3 @@ -3911,7 +3911,7 @@ 5.4 // The number of bytes in this code is used by 5.5 // MachCallDynamicJavaNode::ret_addr_offset() 5.6 // if this changes, change that. 5.7 - if (UseCompressedKlassPointers) { 5.8 + if (UseCompressedClassPointers) { 5.9 lduw(src_oop, oopDesc::klass_offset_in_bytes(), klass); 5.10 decode_klass_not_null(klass); 5.11 } else { 5.12 @@ -3920,7 +3920,7 @@ 5.13 } 5.14 5.15 void MacroAssembler::store_klass(Register klass, Register dst_oop) { 5.16 - if (UseCompressedKlassPointers) { 5.17 + if (UseCompressedClassPointers) { 5.18 assert(dst_oop != klass, "not enough registers"); 5.19 encode_klass_not_null(klass); 5.20 st(klass, dst_oop, oopDesc::klass_offset_in_bytes()); 5.21 @@ -3930,7 +3930,7 @@ 5.22 } 5.23 5.24 void MacroAssembler::store_klass_gap(Register s, Register d) { 5.25 - if (UseCompressedKlassPointers) { 5.26 + if (UseCompressedClassPointers) { 5.27 assert(s != d, "not enough registers"); 5.28 st(s, d, oopDesc::klass_gap_offset_in_bytes()); 5.29 } 5.30 @@ -4089,7 +4089,7 @@ 5.31 } 5.32 5.33 void MacroAssembler::encode_klass_not_null(Register r) { 5.34 - assert (UseCompressedKlassPointers, "must be compressed"); 5.35 + assert (UseCompressedClassPointers, "must be compressed"); 5.36 assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized"); 5.37 assert(r != G6_heapbase, "bad register choice"); 5.38 set((intptr_t)Universe::narrow_klass_base(), G6_heapbase); 5.39 @@ -4105,7 +4105,7 @@ 5.40 if (src == dst) { 5.41 encode_klass_not_null(src); 5.42 } else { 5.43 - assert (UseCompressedKlassPointers, "must be compressed"); 5.44 + assert (UseCompressedClassPointers, "must be compressed"); 5.45 assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized"); 5.46 set((intptr_t)Universe::narrow_klass_base(), dst); 5.47 sub(src, dst, dst); 5.48 @@ -4119,7 +4119,7 @@ 5.49 // generated by decode_klass_not_null() and reinit_heapbase(). Hence, if 5.50 // the instructions they generate change, then this method needs to be updated. 5.51 int MacroAssembler::instr_size_for_decode_klass_not_null() { 5.52 - assert (UseCompressedKlassPointers, "only for compressed klass ptrs"); 5.53 + assert (UseCompressedClassPointers, "only for compressed klass ptrs"); 5.54 // set + add + set 5.55 int num_instrs = insts_for_internal_set((intptr_t)Universe::narrow_klass_base()) + 1 + 5.56 insts_for_internal_set((intptr_t)Universe::narrow_ptrs_base()); 5.57 @@ -4135,7 +4135,7 @@ 5.58 void MacroAssembler::decode_klass_not_null(Register r) { 5.59 // Do not add assert code to this unless you change vtableStubs_sparc.cpp 5.60 // pd_code_size_limit. 5.61 - assert (UseCompressedKlassPointers, "must be compressed"); 5.62 + assert (UseCompressedClassPointers, "must be compressed"); 5.63 assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized"); 5.64 assert(r != G6_heapbase, "bad register choice"); 5.65 set((intptr_t)Universe::narrow_klass_base(), G6_heapbase); 5.66 @@ -4151,7 +4151,7 @@ 5.67 } else { 5.68 // Do not add assert code to this unless you change vtableStubs_sparc.cpp 5.69 // pd_code_size_limit. 5.70 - assert (UseCompressedKlassPointers, "must be compressed"); 5.71 + assert (UseCompressedClassPointers, "must be compressed"); 5.72 assert(Universe::narrow_klass_base() != NULL, "narrow_klass_base should be initialized"); 5.73 if (Universe::narrow_klass_shift() != 0) { 5.74 assert((src != G6_heapbase) && (dst != G6_heapbase), "bad register choice"); 5.75 @@ -4167,7 +4167,7 @@ 5.76 } 5.77 5.78 void MacroAssembler::reinit_heapbase() { 5.79 - if (UseCompressedOops || UseCompressedKlassPointers) { 5.80 + if (UseCompressedOops || UseCompressedClassPointers) { 5.81 if (Universe::heap() != NULL) { 5.82 set((intptr_t)Universe::narrow_ptrs_base(), G6_heapbase); 5.83 } else {
6.1 --- a/src/cpu/sparc/vm/sparc.ad Fri Sep 06 11:11:19 2013 -0700 6.2 +++ b/src/cpu/sparc/vm/sparc.ad Mon Aug 12 17:37:02 2013 +0200 6.3 @@ -557,7 +557,7 @@ 6.4 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); 6.5 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); 6.6 int klass_load_size; 6.7 - if (UseCompressedKlassPointers) { 6.8 + if (UseCompressedClassPointers) { 6.9 assert(Universe::heap() != NULL, "java heap should be initialized"); 6.10 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; 6.11 } else { 6.12 @@ -1657,7 +1657,7 @@ 6.13 void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const { 6.14 st->print_cr("\nUEP:"); 6.15 #ifdef _LP64 6.16 - if (UseCompressedKlassPointers) { 6.17 + if (UseCompressedClassPointers) { 6.18 assert(Universe::heap() != NULL, "java heap should be initialized"); 6.19 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); 6.20 st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base"); 6.21 @@ -1897,7 +1897,7 @@ 6.22 6.23 bool Matcher::narrow_klass_use_complex_address() { 6.24 NOT_LP64(ShouldNotCallThis()); 6.25 - assert(UseCompressedKlassPointers, "only for compressed klass code"); 6.26 + assert(UseCompressedClassPointers, "only for compressed klass code"); 6.27 return false; 6.28 } 6.29 6.30 @@ -2561,7 +2561,7 @@ 6.31 int off = __ offset(); 6.32 __ load_klass(O0, G3_scratch); 6.33 int klass_load_size; 6.34 - if (UseCompressedKlassPointers) { 6.35 + if (UseCompressedClassPointers) { 6.36 assert(Universe::heap() != NULL, "java heap should be initialized"); 6.37 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; 6.38 } else {
7.1 --- a/src/cpu/sparc/vm/stubGenerator_sparc.cpp Fri Sep 06 11:11:19 2013 -0700 7.2 +++ b/src/cpu/sparc/vm/stubGenerator_sparc.cpp Mon Aug 12 17:37:02 2013 +0200 7.3 @@ -2945,7 +2945,7 @@ 7.4 7.5 BLOCK_COMMENT("arraycopy argument klass checks"); 7.6 // get src->klass() 7.7 - if (UseCompressedKlassPointers) { 7.8 + if (UseCompressedClassPointers) { 7.9 __ delayed()->nop(); // ??? not good 7.10 __ load_klass(src, G3_src_klass); 7.11 } else { 7.12 @@ -2980,7 +2980,7 @@ 7.13 // Load 32-bits signed value. Use br() instruction with it to check icc. 7.14 __ lduw(G3_src_klass, lh_offset, G5_lh); 7.15 7.16 - if (UseCompressedKlassPointers) { 7.17 + if (UseCompressedClassPointers) { 7.18 __ load_klass(dst, G4_dst_klass); 7.19 } 7.20 // Handle objArrays completely differently... 7.21 @@ -2988,7 +2988,7 @@ 7.22 __ set(objArray_lh, O5_temp); 7.23 __ cmp(G5_lh, O5_temp); 7.24 __ br(Assembler::equal, false, Assembler::pt, L_objArray); 7.25 - if (UseCompressedKlassPointers) { 7.26 + if (UseCompressedClassPointers) { 7.27 __ delayed()->nop(); 7.28 } else { 7.29 __ delayed()->ld_ptr(dst, oopDesc::klass_offset_in_bytes(), G4_dst_klass);
8.1 --- a/src/cpu/sparc/vm/vtableStubs_sparc.cpp Fri Sep 06 11:11:19 2013 -0700 8.2 +++ b/src/cpu/sparc/vm/vtableStubs_sparc.cpp Mon Aug 12 17:37:02 2013 +0200 8.3 @@ -218,13 +218,13 @@ 8.4 // ld;ld;ld,jmp,nop 8.5 const int basic = 5*BytesPerInstWord + 8.6 // shift;add for load_klass (only shift with zero heap based) 8.7 - (UseCompressedKlassPointers ? 8.8 + (UseCompressedClassPointers ? 8.9 MacroAssembler::instr_size_for_decode_klass_not_null() : 0); 8.10 return basic + slop; 8.11 } else { 8.12 const int basic = (28 LP64_ONLY(+ 6)) * BytesPerInstWord + 8.13 // shift;add for load_klass (only shift with zero heap based) 8.14 - (UseCompressedKlassPointers ? 8.15 + (UseCompressedClassPointers ? 8.16 MacroAssembler::instr_size_for_decode_klass_not_null() : 0); 8.17 return (basic + slop); 8.18 }
9.1 --- a/src/cpu/x86/vm/c1_FrameMap_x86.hpp Fri Sep 06 11:11:19 2013 -0700 9.2 +++ b/src/cpu/x86/vm/c1_FrameMap_x86.hpp Mon Aug 12 17:37:02 2013 +0200 9.3 @@ -148,7 +148,7 @@ 9.4 9.5 static int adjust_reg_range(int range) { 9.6 // Reduce the number of available regs (to free r12) in case of compressed oops 9.7 - if (UseCompressedOops || UseCompressedKlassPointers) return range - 1; 9.8 + if (UseCompressedOops || UseCompressedClassPointers) return range - 1; 9.9 return range; 9.10 } 9.11
10.1 --- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Fri Sep 06 11:11:19 2013 -0700 10.2 +++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Mon Aug 12 17:37:02 2013 +0200 10.3 @@ -341,7 +341,7 @@ 10.4 Register receiver = FrameMap::receiver_opr->as_register(); 10.5 Register ic_klass = IC_Klass; 10.6 const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9); 10.7 - const bool do_post_padding = VerifyOops || UseCompressedKlassPointers; 10.8 + const bool do_post_padding = VerifyOops || UseCompressedClassPointers; 10.9 if (!do_post_padding) { 10.10 // insert some nops so that the verified entry point is aligned on CodeEntryAlignment 10.11 while ((__ offset() + ic_cmp_size) % CodeEntryAlignment != 0) { 10.12 @@ -1263,7 +1263,7 @@ 10.13 break; 10.14 10.15 case T_ADDRESS: 10.16 - if (UseCompressedKlassPointers && addr->disp() == oopDesc::klass_offset_in_bytes()) { 10.17 + if (UseCompressedClassPointers && addr->disp() == oopDesc::klass_offset_in_bytes()) { 10.18 __ movl(dest->as_register(), from_addr); 10.19 } else { 10.20 __ movptr(dest->as_register(), from_addr); 10.21 @@ -1371,7 +1371,7 @@ 10.22 __ verify_oop(dest->as_register()); 10.23 } else if (type == T_ADDRESS && addr->disp() == oopDesc::klass_offset_in_bytes()) { 10.24 #ifdef _LP64 10.25 - if (UseCompressedKlassPointers) { 10.26 + if (UseCompressedClassPointers) { 10.27 __ decode_klass_not_null(dest->as_register()); 10.28 } 10.29 #endif 10.30 @@ -1716,7 +1716,7 @@ 10.31 } else if (obj == klass_RInfo) { 10.32 klass_RInfo = dst; 10.33 } 10.34 - if (k->is_loaded() && !UseCompressedKlassPointers) { 10.35 + if (k->is_loaded() && !UseCompressedClassPointers) { 10.36 select_different_registers(obj, dst, k_RInfo, klass_RInfo); 10.37 } else { 10.38 Rtmp1 = op->tmp3()->as_register(); 10.39 @@ -1754,7 +1754,7 @@ 10.40 // get object class 10.41 // not a safepoint as obj null check happens earlier 10.42 #ifdef _LP64 10.43 - if (UseCompressedKlassPointers) { 10.44 + if (UseCompressedClassPointers) { 10.45 __ load_klass(Rtmp1, obj); 10.46 __ cmpptr(k_RInfo, Rtmp1); 10.47 } else { 10.48 @@ -3294,7 +3294,7 @@ 10.49 // We don't know the array types are compatible 10.50 if (basic_type != T_OBJECT) { 10.51 // Simple test for basic type arrays 10.52 - if (UseCompressedKlassPointers) { 10.53 + if (UseCompressedClassPointers) { 10.54 __ movl(tmp, src_klass_addr); 10.55 __ cmpl(tmp, dst_klass_addr); 10.56 } else { 10.57 @@ -3456,21 +3456,21 @@ 10.58 Label known_ok, halt; 10.59 __ mov_metadata(tmp, default_type->constant_encoding()); 10.60 #ifdef _LP64 10.61 - if (UseCompressedKlassPointers) { 10.62 + if (UseCompressedClassPointers) { 10.63 __ encode_klass_not_null(tmp); 10.64 } 10.65 #endif 10.66 10.67 if (basic_type != T_OBJECT) { 10.68 10.69 - if (UseCompressedKlassPointers) __ cmpl(tmp, dst_klass_addr); 10.70 + if (UseCompressedClassPointers) __ cmpl(tmp, dst_klass_addr); 10.71 else __ cmpptr(tmp, dst_klass_addr); 10.72 __ jcc(Assembler::notEqual, halt); 10.73 - if (UseCompressedKlassPointers) __ cmpl(tmp, src_klass_addr); 10.74 + if (UseCompressedClassPointers) __ cmpl(tmp, src_klass_addr); 10.75 else __ cmpptr(tmp, src_klass_addr); 10.76 __ jcc(Assembler::equal, known_ok); 10.77 } else { 10.78 - if (UseCompressedKlassPointers) __ cmpl(tmp, dst_klass_addr); 10.79 + if (UseCompressedClassPointers) __ cmpl(tmp, dst_klass_addr); 10.80 else __ cmpptr(tmp, dst_klass_addr); 10.81 __ jcc(Assembler::equal, known_ok); 10.82 __ cmpptr(src, dst);
11.1 --- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Fri Sep 06 11:11:19 2013 -0700 11.2 +++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Mon Aug 12 17:37:02 2013 +0200 11.3 @@ -1239,7 +1239,7 @@ 11.4 } 11.5 LIR_Opr reg = rlock_result(x); 11.6 LIR_Opr tmp3 = LIR_OprFact::illegalOpr; 11.7 - if (!x->klass()->is_loaded() || UseCompressedKlassPointers) { 11.8 + if (!x->klass()->is_loaded() || UseCompressedClassPointers) { 11.9 tmp3 = new_register(objectType); 11.10 } 11.11 __ checkcast(reg, obj.result(), x->klass(), 11.12 @@ -1261,7 +1261,7 @@ 11.13 } 11.14 obj.load_item(); 11.15 LIR_Opr tmp3 = LIR_OprFact::illegalOpr; 11.16 - if (!x->klass()->is_loaded() || UseCompressedKlassPointers) { 11.17 + if (!x->klass()->is_loaded() || UseCompressedClassPointers) { 11.18 tmp3 = new_register(objectType); 11.19 } 11.20 __ instanceof(reg, obj.result(), x->klass(),
12.1 --- a/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp Fri Sep 06 11:11:19 2013 -0700 12.2 +++ b/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp Mon Aug 12 17:37:02 2013 +0200 12.3 @@ -157,7 +157,7 @@ 12.4 movptr(Address(obj, oopDesc::mark_offset_in_bytes ()), (int32_t)(intptr_t)markOopDesc::prototype()); 12.5 } 12.6 #ifdef _LP64 12.7 - if (UseCompressedKlassPointers) { // Take care not to kill klass 12.8 + if (UseCompressedClassPointers) { // Take care not to kill klass 12.9 movptr(t1, klass); 12.10 encode_klass_not_null(t1); 12.11 movl(Address(obj, oopDesc::klass_offset_in_bytes()), t1); 12.12 @@ -171,7 +171,7 @@ 12.13 movl(Address(obj, arrayOopDesc::length_offset_in_bytes()), len); 12.14 } 12.15 #ifdef _LP64 12.16 - else if (UseCompressedKlassPointers) { 12.17 + else if (UseCompressedClassPointers) { 12.18 xorptr(t1, t1); 12.19 store_klass_gap(obj, t1); 12.20 } 12.21 @@ -334,7 +334,7 @@ 12.22 assert(!MacroAssembler::needs_explicit_null_check(oopDesc::klass_offset_in_bytes()), "must add explicit null check"); 12.23 int start_offset = offset(); 12.24 12.25 - if (UseCompressedKlassPointers) { 12.26 + if (UseCompressedClassPointers) { 12.27 load_klass(rscratch1, receiver); 12.28 cmpptr(rscratch1, iCache); 12.29 } else { 12.30 @@ -345,7 +345,7 @@ 12.31 jump_cc(Assembler::notEqual, 12.32 RuntimeAddress(SharedRuntime::get_ic_miss_stub())); 12.33 const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9); 12.34 - assert(UseCompressedKlassPointers || offset() - start_offset == ic_cmp_size, "check alignment in emit_method_entry"); 12.35 + assert(UseCompressedClassPointers || offset() - start_offset == ic_cmp_size, "check alignment in emit_method_entry"); 12.36 } 12.37 12.38
13.1 --- a/src/cpu/x86/vm/macroAssembler_x86.cpp Fri Sep 06 11:11:19 2013 -0700 13.2 +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp Mon Aug 12 17:37:02 2013 +0200 13.3 @@ -1635,7 +1635,7 @@ 13.4 #ifdef ASSERT 13.5 // TraceBytecodes does not use r12 but saves it over the call, so don't verify 13.6 // r12 is the heapbase. 13.7 - LP64_ONLY(if ((UseCompressedOops || UseCompressedKlassPointers) && !TraceBytecodes) verify_heapbase("call_VM_base: heap base corrupted?");) 13.8 + LP64_ONLY(if ((UseCompressedOops || UseCompressedClassPointers) && !TraceBytecodes) verify_heapbase("call_VM_base: heap base corrupted?");) 13.9 #endif // ASSERT 13.10 13.11 assert(java_thread != oop_result , "cannot use the same register for java_thread & oop_result"); 13.12 @@ -4802,7 +4802,7 @@ 13.13 13.14 void MacroAssembler::load_klass(Register dst, Register src) { 13.15 #ifdef _LP64 13.16 - if (UseCompressedKlassPointers) { 13.17 + if (UseCompressedClassPointers) { 13.18 movl(dst, Address(src, oopDesc::klass_offset_in_bytes())); 13.19 decode_klass_not_null(dst); 13.20 } else 13.21 @@ -4817,7 +4817,7 @@ 13.22 13.23 void MacroAssembler::store_klass(Register dst, Register src) { 13.24 #ifdef _LP64 13.25 - if (UseCompressedKlassPointers) { 13.26 + if (UseCompressedClassPointers) { 13.27 encode_klass_not_null(src); 13.28 movl(Address(dst, oopDesc::klass_offset_in_bytes()), src); 13.29 } else 13.30 @@ -4892,7 +4892,7 @@ 13.31 13.32 #ifdef _LP64 13.33 void MacroAssembler::store_klass_gap(Register dst, Register src) { 13.34 - if (UseCompressedKlassPointers) { 13.35 + if (UseCompressedClassPointers) { 13.36 // Store to klass gap in destination 13.37 movl(Address(dst, oopDesc::klass_gap_offset_in_bytes()), src); 13.38 } 13.39 @@ -5075,7 +5075,7 @@ 13.40 // when (Universe::heap() != NULL). Hence, if the instructions they 13.41 // generate change, then this method needs to be updated. 13.42 int MacroAssembler::instr_size_for_decode_klass_not_null() { 13.43 - assert (UseCompressedKlassPointers, "only for compressed klass ptrs"); 13.44 + assert (UseCompressedClassPointers, "only for compressed klass ptrs"); 13.45 // mov64 + addq + shlq? + mov64 (for reinit_heapbase()). 13.46 return (Universe::narrow_klass_shift() == 0 ? 20 : 24); 13.47 } 13.48 @@ -5085,7 +5085,7 @@ 13.49 void MacroAssembler::decode_klass_not_null(Register r) { 13.50 // Note: it will change flags 13.51 assert(Universe::narrow_klass_base() != NULL, "Base should be initialized"); 13.52 - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); 13.53 + assert (UseCompressedClassPointers, "should only be used for compressed headers"); 13.54 assert(r != r12_heapbase, "Decoding a klass in r12"); 13.55 // Cannot assert, unverified entry point counts instructions (see .ad file) 13.56 // vtableStubs also counts instructions in pd_code_size_limit. 13.57 @@ -5103,7 +5103,7 @@ 13.58 void MacroAssembler::decode_klass_not_null(Register dst, Register src) { 13.59 // Note: it will change flags 13.60 assert(Universe::narrow_klass_base() != NULL, "Base should be initialized"); 13.61 - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); 13.62 + assert (UseCompressedClassPointers, "should only be used for compressed headers"); 13.63 if (dst == src) { 13.64 decode_klass_not_null(dst); 13.65 } else { 13.66 @@ -5141,7 +5141,7 @@ 13.67 } 13.68 13.69 void MacroAssembler::set_narrow_klass(Register dst, Klass* k) { 13.70 - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); 13.71 + assert (UseCompressedClassPointers, "should only be used for compressed headers"); 13.72 assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); 13.73 int klass_index = oop_recorder()->find_index(k); 13.74 RelocationHolder rspec = metadata_Relocation::spec(klass_index); 13.75 @@ -5149,7 +5149,7 @@ 13.76 } 13.77 13.78 void MacroAssembler::set_narrow_klass(Address dst, Klass* k) { 13.79 - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); 13.80 + assert (UseCompressedClassPointers, "should only be used for compressed headers"); 13.81 assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); 13.82 int klass_index = oop_recorder()->find_index(k); 13.83 RelocationHolder rspec = metadata_Relocation::spec(klass_index); 13.84 @@ -5175,7 +5175,7 @@ 13.85 } 13.86 13.87 void MacroAssembler::cmp_narrow_klass(Register dst, Klass* k) { 13.88 - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); 13.89 + assert (UseCompressedClassPointers, "should only be used for compressed headers"); 13.90 assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); 13.91 int klass_index = oop_recorder()->find_index(k); 13.92 RelocationHolder rspec = metadata_Relocation::spec(klass_index); 13.93 @@ -5183,7 +5183,7 @@ 13.94 } 13.95 13.96 void MacroAssembler::cmp_narrow_klass(Address dst, Klass* k) { 13.97 - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); 13.98 + assert (UseCompressedClassPointers, "should only be used for compressed headers"); 13.99 assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); 13.100 int klass_index = oop_recorder()->find_index(k); 13.101 RelocationHolder rspec = metadata_Relocation::spec(klass_index); 13.102 @@ -5191,7 +5191,7 @@ 13.103 } 13.104 13.105 void MacroAssembler::reinit_heapbase() { 13.106 - if (UseCompressedOops || UseCompressedKlassPointers) { 13.107 + if (UseCompressedOops || UseCompressedClassPointers) { 13.108 if (Universe::heap() != NULL) { 13.109 if (Universe::narrow_oop_base() == NULL) { 13.110 MacroAssembler::xorptr(r12_heapbase, r12_heapbase);
14.1 --- a/src/cpu/x86/vm/vtableStubs_x86_64.cpp Fri Sep 06 11:11:19 2013 -0700 14.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_64.cpp Mon Aug 12 17:37:02 2013 +0200 14.3 @@ -211,11 +211,11 @@ 14.4 if (is_vtable_stub) { 14.5 // Vtable stub size 14.6 return (DebugVtables ? 512 : 24) + (CountCompiledCalls ? 13 : 0) + 14.7 - (UseCompressedKlassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0); 14.8 + (UseCompressedClassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0); 14.9 } else { 14.10 // Itable stub size 14.11 return (DebugVtables ? 512 : 74) + (CountCompiledCalls ? 13 : 0) + 14.12 - (UseCompressedKlassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0); 14.13 + (UseCompressedClassPointers ? MacroAssembler::instr_size_for_decode_klass_not_null() : 0); 14.14 } 14.15 // In order to tune these parameters, run the JVM with VM options 14.16 // +PrintMiscellaneous and +WizardMode to see information about
15.1 --- a/src/cpu/x86/vm/x86_64.ad Fri Sep 06 11:11:19 2013 -0700 15.2 +++ b/src/cpu/x86/vm/x86_64.ad Mon Aug 12 17:37:02 2013 +0200 15.3 @@ -1391,7 +1391,7 @@ 15.4 #ifndef PRODUCT 15.5 void MachUEPNode::format(PhaseRegAlloc* ra_, outputStream* st) const 15.6 { 15.7 - if (UseCompressedKlassPointers) { 15.8 + if (UseCompressedClassPointers) { 15.9 st->print_cr("movl rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass"); 15.10 st->print_cr("\tdecode_klass_not_null rscratch1, rscratch1"); 15.11 st->print_cr("\tcmpq rax, rscratch1\t # Inline cache check"); 15.12 @@ -1408,7 +1408,7 @@ 15.13 { 15.14 MacroAssembler masm(&cbuf); 15.15 uint insts_size = cbuf.insts_size(); 15.16 - if (UseCompressedKlassPointers) { 15.17 + if (UseCompressedClassPointers) { 15.18 masm.load_klass(rscratch1, j_rarg0); 15.19 masm.cmpptr(rax, rscratch1); 15.20 } else { 15.21 @@ -1557,7 +1557,7 @@ 15.22 } 15.23 15.24 bool Matcher::narrow_klass_use_complex_address() { 15.25 - assert(UseCompressedKlassPointers, "only for compressed klass code"); 15.26 + assert(UseCompressedClassPointers, "only for compressed klass code"); 15.27 return (LogKlassAlignmentInBytes <= 3); 15.28 } 15.29
16.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Sep 06 11:11:19 2013 -0700 16.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Mon Aug 12 17:37:02 2013 +0200 16.3 @@ -230,7 +230,7 @@ 16.4 // depends on this property. 16.5 debug_only( 16.6 FreeChunk* junk = NULL; 16.7 - assert(UseCompressedKlassPointers || 16.8 + assert(UseCompressedClassPointers || 16.9 junk->prev_addr() == (void*)(oop(junk)->klass_addr()), 16.10 "Offset of FreeChunk::_prev within FreeChunk must match" 16.11 " that of OopDesc::_klass within OopDesc"); 16.12 @@ -1407,7 +1407,7 @@ 16.13 assert(!((FreeChunk*)obj_ptr)->is_free(), "Error, block will look free but show wrong size"); 16.14 OrderAccess::storestore(); 16.15 16.16 - if (UseCompressedKlassPointers) { 16.17 + if (UseCompressedClassPointers) { 16.18 // Copy gap missed by (aligned) header size calculation below 16.19 obj->set_klass_gap(old->klass_gap()); 16.20 }
17.1 --- a/src/share/vm/memory/metaspace.cpp Fri Sep 06 11:11:19 2013 -0700 17.2 +++ b/src/share/vm/memory/metaspace.cpp Mon Aug 12 17:37:02 2013 +0200 17.3 @@ -423,7 +423,7 @@ 17.4 // Can this virtual list allocate >1 spaces? Also, used to determine 17.5 // whether to allocate unlimited small chunks in this virtual space 17.6 bool _is_class; 17.7 - bool can_grow() const { return !is_class() || !UseCompressedKlassPointers; } 17.8 + bool can_grow() const { return !is_class() || !UseCompressedClassPointers; } 17.9 17.10 // Sum of space in all virtual spaces and number of virtual spaces 17.11 size_t _virtual_space_total; 17.12 @@ -2836,7 +2836,7 @@ 17.13 // to work with compressed klass pointers. 17.14 bool Metaspace::can_use_cds_with_metaspace_addr(char* metaspace_base, address cds_base) { 17.15 assert(cds_base != 0 && UseSharedSpaces, "Only use with CDS"); 17.16 - assert(UseCompressedKlassPointers, "Only use with CompressedKlassPtrs"); 17.17 + assert(UseCompressedClassPointers, "Only use with CompressedKlassPtrs"); 17.18 address lower_base = MIN2((address)metaspace_base, cds_base); 17.19 address higher_address = MAX2((address)(cds_base + FileMapInfo::shared_spaces_size()), 17.20 (address)(metaspace_base + class_metaspace_size())); 17.21 @@ -2846,7 +2846,7 @@ 17.22 // Try to allocate the metaspace at the requested addr. 17.23 void Metaspace::allocate_metaspace_compressed_klass_ptrs(char* requested_addr, address cds_base) { 17.24 assert(using_class_space(), "called improperly"); 17.25 - assert(UseCompressedKlassPointers, "Only use with CompressedKlassPtrs"); 17.26 + assert(UseCompressedClassPointers, "Only use with CompressedKlassPtrs"); 17.27 assert(class_metaspace_size() < KlassEncodingMetaspaceMax, 17.28 "Metaspace size is too big"); 17.29 17.30 @@ -2869,9 +2869,9 @@ 17.31 17.32 // If no successful allocation then try to allocate the space anywhere. If 17.33 // that fails then OOM doom. At this point we cannot try allocating the 17.34 - // metaspace as if UseCompressedKlassPointers is off because too much 17.35 - // initialization has happened that depends on UseCompressedKlassPointers. 17.36 - // So, UseCompressedKlassPointers cannot be turned off at this point. 17.37 + // metaspace as if UseCompressedClassPointers is off because too much 17.38 + // initialization has happened that depends on UseCompressedClassPointers. 17.39 + // So, UseCompressedClassPointers cannot be turned off at this point. 17.40 if (!metaspace_rs.is_reserved()) { 17.41 metaspace_rs = ReservedSpace(class_metaspace_size(), 17.42 os::vm_allocation_granularity(), false); 17.43 @@ -2904,12 +2904,12 @@ 17.44 } 17.45 } 17.46 17.47 -// For UseCompressedKlassPointers the class space is reserved above the top of 17.48 +// For UseCompressedClassPointers the class space is reserved above the top of 17.49 // the Java heap. The argument passed in is at the base of the compressed space. 17.50 void Metaspace::initialize_class_space(ReservedSpace rs) { 17.51 // The reserved space size may be bigger because of alignment, esp with UseLargePages 17.52 - assert(rs.size() >= ClassMetaspaceSize, 17.53 - err_msg(SIZE_FORMAT " != " UINTX_FORMAT, rs.size(), ClassMetaspaceSize)); 17.54 + assert(rs.size() >= CompressedClassSpaceSize, 17.55 + err_msg(SIZE_FORMAT " != " UINTX_FORMAT, rs.size(), CompressedClassSpaceSize)); 17.56 assert(using_class_space(), "Must be using class space"); 17.57 _class_space_list = new VirtualSpaceList(rs); 17.58 } 17.59 @@ -2921,7 +2921,7 @@ 17.60 int max_alignment = os::vm_page_size(); 17.61 size_t cds_total = 0; 17.62 17.63 - set_class_metaspace_size(align_size_up(ClassMetaspaceSize, 17.64 + set_class_metaspace_size(align_size_up(CompressedClassSpaceSize, 17.65 os::vm_allocation_granularity())); 17.66 17.67 MetaspaceShared::set_max_alignment(max_alignment); 17.68 @@ -2941,8 +2941,8 @@ 17.69 #ifdef _LP64 17.70 // Set the compressed klass pointer base so that decoding of these pointers works 17.71 // properly when creating the shared archive. 17.72 - assert(UseCompressedOops && UseCompressedKlassPointers, 17.73 - "UseCompressedOops and UseCompressedKlassPointers must be set"); 17.74 + assert(UseCompressedOops && UseCompressedClassPointers, 17.75 + "UseCompressedOops and UseCompressedClassPointers must be set"); 17.76 Universe::set_narrow_klass_base((address)_space_list->current_virtual_space()->bottom()); 17.77 if (TraceMetavirtualspaceAllocation && Verbose) { 17.78 gclog_or_tty->print_cr("Setting_narrow_klass_base to Address: " PTR_FORMAT, 17.79 @@ -2979,7 +2979,7 @@ 17.80 } 17.81 17.82 #ifdef _LP64 17.83 - // If UseCompressedKlassPointers is set then allocate the metaspace area 17.84 + // If UseCompressedClassPointers is set then allocate the metaspace area 17.85 // above the heap and above the CDS area (if it exists). 17.86 if (using_class_space()) { 17.87 if (UseSharedSpaces) { 17.88 @@ -2997,7 +2997,7 @@ 17.89 // on the medium chunk list. The next chunk will be small and progress 17.90 // from there. This size calculated by -version. 17.91 _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6, 17.92 - (ClassMetaspaceSize/BytesPerWord)*2); 17.93 + (CompressedClassSpaceSize/BytesPerWord)*2); 17.94 _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size); 17.95 // Arbitrarily set the initial virtual space to a multiple 17.96 // of the boot class loader size. 17.97 @@ -3064,7 +3064,7 @@ 17.98 17.99 MetaWord* Metaspace::allocate(size_t word_size, MetadataType mdtype) { 17.100 // DumpSharedSpaces doesn't use class metadata area (yet) 17.101 - // Also, don't use class_vsm() unless UseCompressedKlassPointers is true. 17.102 + // Also, don't use class_vsm() unless UseCompressedClassPointers is true. 17.103 if (mdtype == ClassType && using_class_space()) { 17.104 return class_vsm()->allocate(word_size); 17.105 } else { 17.106 @@ -3213,7 +3213,7 @@ 17.107 MetaspaceAux::dump(gclog_or_tty); 17.108 } 17.109 // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support 17.110 - const char* space_string = (mdtype == ClassType) ? "Class Metadata space" : 17.111 + const char* space_string = (mdtype == ClassType) ? "Compressed class space" : 17.112 "Metadata space"; 17.113 report_java_out_of_memory(space_string); 17.114
18.1 --- a/src/share/vm/memory/metaspace.hpp Fri Sep 06 11:11:19 2013 -0700 18.2 +++ b/src/share/vm/memory/metaspace.hpp Mon Aug 12 17:37:02 2013 +0200 18.3 @@ -213,9 +213,9 @@ 18.4 18.5 void iterate(AllocRecordClosure *closure); 18.6 18.7 - // Return TRUE only if UseCompressedKlassPointers is True and DumpSharedSpaces is False. 18.8 + // Return TRUE only if UseCompressedClassPointers is True and DumpSharedSpaces is False. 18.9 static bool using_class_space() { 18.10 - return NOT_LP64(false) LP64_ONLY(UseCompressedKlassPointers && !DumpSharedSpaces); 18.11 + return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers && !DumpSharedSpaces); 18.12 } 18.13 18.14 };
19.1 --- a/src/share/vm/memory/metaspaceCounters.cpp Fri Sep 06 11:11:19 2013 -0700 19.2 +++ b/src/share/vm/memory/metaspaceCounters.cpp Mon Aug 12 17:37:02 2013 +0200 19.3 @@ -109,7 +109,7 @@ 19.4 } 19.5 19.6 void CompressedClassSpaceCounters::update_performance_counters() { 19.7 - if (UsePerfData && UseCompressedKlassPointers) { 19.8 + if (UsePerfData && UseCompressedClassPointers) { 19.9 assert(_perf_counters != NULL, "Should be initialized"); 19.10 19.11 size_t capacity = calculate_capacity(); 19.12 @@ -125,7 +125,7 @@ 19.13 assert(_perf_counters == NULL, "Should only be initialized once"); 19.14 const char* ns = "compressedclassspace"; 19.15 19.16 - if (UseCompressedKlassPointers) { 19.17 + if (UseCompressedClassPointers) { 19.18 size_t min_capacity = MetaspaceAux::min_chunk_size(); 19.19 size_t capacity = calculate_capacity(); 19.20 size_t max_capacity = MetaspaceAux::reserved_in_bytes(_class_type);
20.1 --- a/src/share/vm/memory/universe.cpp Fri Sep 06 11:11:19 2013 -0700 20.2 +++ b/src/share/vm/memory/universe.cpp Mon Aug 12 17:37:02 2013 +0200 20.3 @@ -1028,7 +1028,7 @@ 20.4 20.5 msg = java_lang_String::create_from_str("Metadata space", CHECK_false); 20.6 java_lang_Throwable::set_message(Universe::_out_of_memory_error_metaspace, msg()); 20.7 - msg = java_lang_String::create_from_str("Class Metadata space", CHECK_false); 20.8 + msg = java_lang_String::create_from_str("Compressed class space", CHECK_false); 20.9 java_lang_Throwable::set_message(Universe::_out_of_memory_error_class_metaspace, msg()); 20.10 20.11 msg = java_lang_String::create_from_str("Requested array size exceeds VM limit", CHECK_false);
21.1 --- a/src/share/vm/memory/universe.hpp Fri Sep 06 11:11:19 2013 -0700 21.2 +++ b/src/share/vm/memory/universe.hpp Mon Aug 12 17:37:02 2013 +0200 21.3 @@ -181,7 +181,7 @@ 21.4 21.5 // For UseCompressedOops. 21.6 static struct NarrowPtrStruct _narrow_oop; 21.7 - // For UseCompressedKlassPointers. 21.8 + // For UseCompressedClassPointers. 21.9 static struct NarrowPtrStruct _narrow_klass; 21.10 static address _narrow_ptrs_base; 21.11 21.12 @@ -229,7 +229,7 @@ 21.13 _narrow_oop._base = base; 21.14 } 21.15 static void set_narrow_klass_base(address base) { 21.16 - assert(UseCompressedKlassPointers, "no compressed klass ptrs?"); 21.17 + assert(UseCompressedClassPointers, "no compressed klass ptrs?"); 21.18 _narrow_klass._base = base; 21.19 } 21.20 static void set_narrow_oop_use_implicit_null_checks(bool use) { 21.21 @@ -353,7 +353,7 @@ 21.22 static int narrow_oop_shift() { return _narrow_oop._shift; } 21.23 static bool narrow_oop_use_implicit_null_checks() { return _narrow_oop._use_implicit_null_checks; } 21.24 21.25 - // For UseCompressedKlassPointers 21.26 + // For UseCompressedClassPointers 21.27 static address narrow_klass_base() { return _narrow_klass._base; } 21.28 static bool is_narrow_klass_base(void* addr) { return (narrow_klass_base() == (address)addr); } 21.29 static int narrow_klass_shift() { return _narrow_klass._shift; }
22.1 --- a/src/share/vm/oops/arrayOop.hpp Fri Sep 06 11:11:19 2013 -0700 22.2 +++ b/src/share/vm/oops/arrayOop.hpp Mon Aug 12 17:37:02 2013 +0200 22.3 @@ -65,7 +65,7 @@ 22.4 // declared nonstatic fields in arrayOopDesc if not compressed, otherwise 22.5 // it occupies the second half of the _klass field in oopDesc. 22.6 static int length_offset_in_bytes() { 22.7 - return UseCompressedKlassPointers ? klass_gap_offset_in_bytes() : 22.8 + return UseCompressedClassPointers ? klass_gap_offset_in_bytes() : 22.9 sizeof(arrayOopDesc); 22.10 } 22.11
23.1 --- a/src/share/vm/oops/instanceOop.hpp Fri Sep 06 11:11:19 2013 -0700 23.2 +++ b/src/share/vm/oops/instanceOop.hpp Mon Aug 12 17:37:02 2013 +0200 23.3 @@ -37,9 +37,9 @@ 23.4 23.5 // If compressed, the offset of the fields of the instance may not be aligned. 23.6 static int base_offset_in_bytes() { 23.7 - // offset computation code breaks if UseCompressedKlassPointers 23.8 + // offset computation code breaks if UseCompressedClassPointers 23.9 // only is true 23.10 - return (UseCompressedOops && UseCompressedKlassPointers) ? 23.11 + return (UseCompressedOops && UseCompressedClassPointers) ? 23.12 klass_gap_offset_in_bytes() : 23.13 sizeof(instanceOopDesc); 23.14 }
24.1 --- a/src/share/vm/oops/oop.inline.hpp Fri Sep 06 11:11:19 2013 -0700 24.2 +++ b/src/share/vm/oops/oop.inline.hpp Mon Aug 12 17:37:02 2013 +0200 24.3 @@ -69,7 +69,7 @@ 24.4 } 24.5 24.6 inline Klass* oopDesc::klass() const { 24.7 - if (UseCompressedKlassPointers) { 24.8 + if (UseCompressedClassPointers) { 24.9 return Klass::decode_klass_not_null(_metadata._compressed_klass); 24.10 } else { 24.11 return _metadata._klass; 24.12 @@ -78,7 +78,7 @@ 24.13 24.14 inline Klass* oopDesc::klass_or_null() const volatile { 24.15 // can be NULL in CMS 24.16 - if (UseCompressedKlassPointers) { 24.17 + if (UseCompressedClassPointers) { 24.18 return Klass::decode_klass(_metadata._compressed_klass); 24.19 } else { 24.20 return _metadata._klass; 24.21 @@ -86,19 +86,19 @@ 24.22 } 24.23 24.24 inline int oopDesc::klass_gap_offset_in_bytes() { 24.25 - assert(UseCompressedKlassPointers, "only applicable to compressed klass pointers"); 24.26 + assert(UseCompressedClassPointers, "only applicable to compressed klass pointers"); 24.27 return oopDesc::klass_offset_in_bytes() + sizeof(narrowKlass); 24.28 } 24.29 24.30 inline Klass** oopDesc::klass_addr() { 24.31 // Only used internally and with CMS and will not work with 24.32 // UseCompressedOops 24.33 - assert(!UseCompressedKlassPointers, "only supported with uncompressed klass pointers"); 24.34 + assert(!UseCompressedClassPointers, "only supported with uncompressed klass pointers"); 24.35 return (Klass**) &_metadata._klass; 24.36 } 24.37 24.38 inline narrowKlass* oopDesc::compressed_klass_addr() { 24.39 - assert(UseCompressedKlassPointers, "only called by compressed klass pointers"); 24.40 + assert(UseCompressedClassPointers, "only called by compressed klass pointers"); 24.41 return &_metadata._compressed_klass; 24.42 } 24.43 24.44 @@ -106,7 +106,7 @@ 24.45 // since klasses are promoted no store check is needed 24.46 assert(Universe::is_bootstrapping() || k != NULL, "must be a real Klass*"); 24.47 assert(Universe::is_bootstrapping() || k->is_klass(), "not a Klass*"); 24.48 - if (UseCompressedKlassPointers) { 24.49 + if (UseCompressedClassPointers) { 24.50 *compressed_klass_addr() = Klass::encode_klass_not_null(k); 24.51 } else { 24.52 *klass_addr() = k; 24.53 @@ -118,7 +118,7 @@ 24.54 } 24.55 24.56 inline void oopDesc::set_klass_gap(int v) { 24.57 - if (UseCompressedKlassPointers) { 24.58 + if (UseCompressedClassPointers) { 24.59 *(int*)(((intptr_t)this) + klass_gap_offset_in_bytes()) = v; 24.60 } 24.61 } 24.62 @@ -126,7 +126,7 @@ 24.63 inline void oopDesc::set_klass_to_list_ptr(oop k) { 24.64 // This is only to be used during GC, for from-space objects, so no 24.65 // barrier is needed. 24.66 - if (UseCompressedKlassPointers) { 24.67 + if (UseCompressedClassPointers) { 24.68 _metadata._compressed_klass = (narrowKlass)encode_heap_oop(k); // may be null (parnew overflow handling) 24.69 } else { 24.70 _metadata._klass = (Klass*)(address)k; 24.71 @@ -135,7 +135,7 @@ 24.72 24.73 inline oop oopDesc::list_ptr_from_klass() { 24.74 // This is only to be used during GC, for from-space objects. 24.75 - if (UseCompressedKlassPointers) { 24.76 + if (UseCompressedClassPointers) { 24.77 return decode_heap_oop((narrowOop)_metadata._compressed_klass); 24.78 } else { 24.79 // Special case for GC
25.1 --- a/src/share/vm/opto/cfgnode.cpp Fri Sep 06 11:11:19 2013 -0700 25.2 +++ b/src/share/vm/opto/cfgnode.cpp Mon Aug 12 17:37:02 2013 +0200 25.3 @@ -1932,7 +1932,7 @@ 25.4 #ifdef _LP64 25.5 // Push DecodeN/DecodeNKlass down through phi. 25.6 // The rest of phi graph will transform by split EncodeP node though phis up. 25.7 - if ((UseCompressedOops || UseCompressedKlassPointers) && can_reshape && progress == NULL) { 25.8 + if ((UseCompressedOops || UseCompressedClassPointers) && can_reshape && progress == NULL) { 25.9 bool may_push = true; 25.10 bool has_decodeN = false; 25.11 bool is_decodeN = false;
26.1 --- a/src/share/vm/opto/compile.cpp Fri Sep 06 11:11:19 2013 -0700 26.2 +++ b/src/share/vm/opto/compile.cpp Mon Aug 12 17:37:02 2013 +0200 26.3 @@ -2631,7 +2631,7 @@ 26.4 addp->in(AddPNode::Base) == n->in(AddPNode::Base), 26.5 "Base pointers must match" ); 26.6 #ifdef _LP64 26.7 - if ((UseCompressedOops || UseCompressedKlassPointers) && 26.8 + if ((UseCompressedOops || UseCompressedClassPointers) && 26.9 addp->Opcode() == Op_ConP && 26.10 addp == n->in(AddPNode::Base) && 26.11 n->in(AddPNode::Offset)->is_Con()) { 26.12 @@ -3018,7 +3018,7 @@ 26.13 26.14 // Skip next transformation if compressed oops are not used. 26.15 if ((UseCompressedOops && !Matcher::gen_narrow_oop_implicit_null_checks()) || 26.16 - (!UseCompressedOops && !UseCompressedKlassPointers)) 26.17 + (!UseCompressedOops && !UseCompressedClassPointers)) 26.18 return; 26.19 26.20 // Go over safepoints nodes to skip DecodeN/DecodeNKlass nodes for debug edges.
27.1 --- a/src/share/vm/opto/connode.cpp Fri Sep 06 11:11:19 2013 -0700 27.2 +++ b/src/share/vm/opto/connode.cpp Mon Aug 12 17:37:02 2013 +0200 27.3 @@ -630,7 +630,7 @@ 27.4 if (t == Type::TOP) return Type::TOP; 27.5 assert (t != TypePtr::NULL_PTR, "null klass?"); 27.6 27.7 - assert(UseCompressedKlassPointers && t->isa_klassptr(), "only klass ptr here"); 27.8 + assert(UseCompressedClassPointers && t->isa_klassptr(), "only klass ptr here"); 27.9 return t->make_narrowklass(); 27.10 } 27.11
28.1 --- a/src/share/vm/opto/library_call.cpp Fri Sep 06 11:11:19 2013 -0700 28.2 +++ b/src/share/vm/opto/library_call.cpp Mon Aug 12 17:37:02 2013 +0200 28.3 @@ -4199,7 +4199,7 @@ 28.4 // 12 - 64-bit VM, compressed klass 28.5 // 16 - 64-bit VM, normal klass 28.6 if (base_off % BytesPerLong != 0) { 28.7 - assert(UseCompressedKlassPointers, ""); 28.8 + assert(UseCompressedClassPointers, ""); 28.9 if (is_array) { 28.10 // Exclude length to copy by 8 bytes words. 28.11 base_off += sizeof(int);
29.1 --- a/src/share/vm/opto/live.cpp Fri Sep 06 11:11:19 2013 -0700 29.2 +++ b/src/share/vm/opto/live.cpp Mon Aug 12 17:37:02 2013 +0200 29.3 @@ -321,7 +321,7 @@ 29.4 #ifdef _LP64 29.5 UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP || 29.6 UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN || 29.7 - UseCompressedKlassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass || 29.8 + UseCompressedClassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass || 29.9 #endif 29.10 check->as_Mach()->ideal_Opcode() == Op_LoadP || 29.11 check->as_Mach()->ideal_Opcode() == Op_LoadKlass)) {
30.1 --- a/src/share/vm/opto/macro.cpp Fri Sep 06 11:11:19 2013 -0700 30.2 +++ b/src/share/vm/opto/macro.cpp Mon Aug 12 17:37:02 2013 +0200 30.3 @@ -2191,7 +2191,7 @@ 30.4 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); 30.5 klass_node = transform_later( LoadKlassNode::make(_igvn, mem, k_adr, _igvn.type(k_adr)->is_ptr()) ); 30.6 #ifdef _LP64 30.7 - if (UseCompressedKlassPointers && klass_node->is_DecodeNKlass()) { 30.8 + if (UseCompressedClassPointers && klass_node->is_DecodeNKlass()) { 30.9 assert(klass_node->in(1)->Opcode() == Op_LoadNKlass, "sanity"); 30.10 klass_node->in(1)->init_req(0, ctrl); 30.11 } else
31.1 --- a/src/share/vm/opto/memnode.cpp Fri Sep 06 11:11:19 2013 -0700 31.2 +++ b/src/share/vm/opto/memnode.cpp Mon Aug 12 17:37:02 2013 +0200 31.3 @@ -1971,7 +1971,7 @@ 31.4 assert(adr_type != NULL, "expecting TypeKlassPtr"); 31.5 #ifdef _LP64 31.6 if (adr_type->is_ptr_to_narrowklass()) { 31.7 - assert(UseCompressedKlassPointers, "no compressed klasses"); 31.8 + assert(UseCompressedClassPointers, "no compressed klasses"); 31.9 Node* load_klass = gvn.transform(new (C) LoadNKlassNode(ctl, mem, adr, at, tk->make_narrowklass())); 31.10 return new (C) DecodeNKlassNode(load_klass, load_klass->bottom_type()->make_ptr()); 31.11 } 31.12 @@ -2309,7 +2309,7 @@ 31.13 val = gvn.transform(new (C) EncodePNode(val, val->bottom_type()->make_narrowoop())); 31.14 return new (C) StoreNNode(ctl, mem, adr, adr_type, val); 31.15 } else if (adr->bottom_type()->is_ptr_to_narrowklass() || 31.16 - (UseCompressedKlassPointers && val->bottom_type()->isa_klassptr() && 31.17 + (UseCompressedClassPointers && val->bottom_type()->isa_klassptr() && 31.18 adr->bottom_type()->isa_rawptr())) { 31.19 val = gvn.transform(new (C) EncodePKlassNode(val, val->bottom_type()->make_narrowklass())); 31.20 return new (C) StoreNKlassNode(ctl, mem, adr, adr_type, val);
32.1 --- a/src/share/vm/opto/type.cpp Fri Sep 06 11:11:19 2013 -0700 32.2 +++ b/src/share/vm/opto/type.cpp Mon Aug 12 17:37:02 2013 +0200 32.3 @@ -2381,7 +2381,7 @@ 32.4 #ifdef _LP64 32.5 if (_offset != 0) { 32.6 if (_offset == oopDesc::klass_offset_in_bytes()) { 32.7 - _is_ptr_to_narrowklass = UseCompressedKlassPointers; 32.8 + _is_ptr_to_narrowklass = UseCompressedClassPointers; 32.9 } else if (klass() == NULL) { 32.10 // Array with unknown body type 32.11 assert(this->isa_aryptr(), "only arrays without klass");
33.1 --- a/src/share/vm/runtime/arguments.cpp Fri Sep 06 11:11:19 2013 -0700 33.2 +++ b/src/share/vm/runtime/arguments.cpp Mon Aug 12 17:37:02 2013 +0200 33.3 @@ -1439,7 +1439,7 @@ 33.4 if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) { 33.5 warning("Max heap size too large for Compressed Oops"); 33.6 FLAG_SET_DEFAULT(UseCompressedOops, false); 33.7 - FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); 33.8 + FLAG_SET_DEFAULT(UseCompressedClassPointers, false); 33.9 } 33.10 } 33.11 #endif // _LP64 33.12 @@ -1452,22 +1452,22 @@ 33.13 void Arguments::set_use_compressed_klass_ptrs() { 33.14 #ifndef ZERO 33.15 #ifdef _LP64 33.16 - // UseCompressedOops must be on for UseCompressedKlassPointers to be on. 33.17 + // UseCompressedOops must be on for UseCompressedClassPointers to be on. 33.18 if (!UseCompressedOops) { 33.19 - if (UseCompressedKlassPointers) { 33.20 - warning("UseCompressedKlassPointers requires UseCompressedOops"); 33.21 + if (UseCompressedClassPointers) { 33.22 + warning("UseCompressedClassPointers requires UseCompressedOops"); 33.23 } 33.24 - FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); 33.25 + FLAG_SET_DEFAULT(UseCompressedClassPointers, false); 33.26 } else { 33.27 - // Turn on UseCompressedKlassPointers too 33.28 - if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) { 33.29 - FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true); 33.30 + // Turn on UseCompressedClassPointers too 33.31 + if (FLAG_IS_DEFAULT(UseCompressedClassPointers)) { 33.32 + FLAG_SET_ERGO(bool, UseCompressedClassPointers, true); 33.33 } 33.34 - // Check the ClassMetaspaceSize to make sure we use compressed klass ptrs. 33.35 - if (UseCompressedKlassPointers) { 33.36 - if (ClassMetaspaceSize > KlassEncodingMetaspaceMax) { 33.37 - warning("Class metaspace size is too large for UseCompressedKlassPointers"); 33.38 - FLAG_SET_DEFAULT(UseCompressedKlassPointers, false); 33.39 + // Check the CompressedClassSpaceSize to make sure we use compressed klass ptrs. 33.40 + if (UseCompressedClassPointers) { 33.41 + if (CompressedClassSpaceSize > KlassEncodingMetaspaceMax) { 33.42 + warning("CompressedClassSpaceSize is too large for UseCompressedClassPointers"); 33.43 + FLAG_SET_DEFAULT(UseCompressedClassPointers, false); 33.44 } 33.45 } 33.46 } 33.47 @@ -2148,8 +2148,8 @@ 33.48 33.49 status = status && verify_object_alignment(); 33.50 33.51 - status = status && verify_interval(ClassMetaspaceSize, 1*M, 3*G, 33.52 - "ClassMetaspaceSize"); 33.53 + status = status && verify_interval(CompressedClassSpaceSize, 1*M, 3*G, 33.54 + "CompressedClassSpaceSize"); 33.55 33.56 status = status && verify_interval(MarkStackSizeMax, 33.57 1, (max_jint - 1), "MarkStackSizeMax"); 33.58 @@ -3274,13 +3274,13 @@ 33.59 } 33.60 UseSharedSpaces = false; 33.61 #ifdef _LP64 33.62 - if (!UseCompressedOops || !UseCompressedKlassPointers) { 33.63 + if (!UseCompressedOops || !UseCompressedClassPointers) { 33.64 vm_exit_during_initialization( 33.65 - "Cannot dump shared archive when UseCompressedOops or UseCompressedKlassPointers is off.", NULL); 33.66 + "Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off.", NULL); 33.67 } 33.68 } else { 33.69 - // UseCompressedOops and UseCompressedKlassPointers must be on for UseSharedSpaces. 33.70 - if (!UseCompressedOops || !UseCompressedKlassPointers) { 33.71 + // UseCompressedOops and UseCompressedClassPointers must be on for UseSharedSpaces. 33.72 + if (!UseCompressedOops || !UseCompressedClassPointers) { 33.73 no_shared_spaces(); 33.74 } 33.75 #endif 33.76 @@ -3581,7 +3581,7 @@ 33.77 FLAG_SET_DEFAULT(ProfileInterpreter, false); 33.78 FLAG_SET_DEFAULT(UseBiasedLocking, false); 33.79 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); 33.80 - LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedKlassPointers, false)); 33.81 + LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedClassPointers, false)); 33.82 #endif // CC_INTERP 33.83 33.84 #ifdef COMPILER2 33.85 @@ -3610,6 +3610,10 @@ 33.86 DebugNonSafepoints = true; 33.87 } 33.88 33.89 + if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) { 33.90 + warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used"); 33.91 + } 33.92 + 33.93 #ifndef PRODUCT 33.94 if (CompileTheWorld) { 33.95 // Force NmethodSweeper to sweep whole CodeCache each time.
34.1 --- a/src/share/vm/runtime/globals.hpp Fri Sep 06 11:11:19 2013 -0700 34.2 +++ b/src/share/vm/runtime/globals.hpp Mon Aug 12 17:37:02 2013 +0200 34.3 @@ -443,8 +443,8 @@ 34.4 "Use 32-bit object references in 64-bit VM " \ 34.5 "lp64_product means flag is always constant in 32 bit VM") \ 34.6 \ 34.7 - lp64_product(bool, UseCompressedKlassPointers, false, \ 34.8 - "Use 32-bit klass pointers in 64-bit VM " \ 34.9 + lp64_product(bool, UseCompressedClassPointers, false, \ 34.10 + "Use 32-bit class pointers in 64-bit VM " \ 34.11 "lp64_product means flag is always constant in 32 bit VM") \ 34.12 \ 34.13 notproduct(bool, CheckCompressedOops, true, \ 34.14 @@ -3039,9 +3039,9 @@ 34.15 product(uintx, MaxMetaspaceSize, max_uintx, \ 34.16 "Maximum size of Metaspaces (in bytes)") \ 34.17 \ 34.18 - product(uintx, ClassMetaspaceSize, 1*G, \ 34.19 - "Maximum size of InstanceKlass area in Metaspace used for " \ 34.20 - "UseCompressedKlassPointers") \ 34.21 + product(uintx, CompressedClassSpaceSize, 1*G, \ 34.22 + "Maximum size of class area in Metaspace when compressed " \ 34.23 + "class pointers are used") \ 34.24 \ 34.25 product(uintx, MinHeapFreeRatio, 40, \ 34.26 "Min percentage of heap free after GC to avoid expansion") \
35.1 --- a/src/share/vm/services/memoryPool.cpp Fri Sep 06 11:11:19 2013 -0700 35.2 +++ b/src/share/vm/services/memoryPool.cpp Mon Aug 12 17:37:02 2013 +0200 35.3 @@ -280,7 +280,7 @@ 35.4 } 35.5 35.6 CompressedKlassSpacePool::CompressedKlassSpacePool() : 35.7 - MemoryPool("Compressed Class Space", NonHeap, capacity_in_bytes(), ClassMetaspaceSize, true, false) { } 35.8 + MemoryPool("Compressed Class Space", NonHeap, capacity_in_bytes(), CompressedClassSpaceSize, true, false) { } 35.9 35.10 size_t CompressedKlassSpacePool::used_in_bytes() { 35.11 return MetaspaceAux::allocated_used_bytes(Metaspace::ClassType);
36.1 --- a/src/share/vm/services/memoryService.cpp Fri Sep 06 11:11:19 2013 -0700 36.2 +++ b/src/share/vm/services/memoryService.cpp Mon Aug 12 17:37:02 2013 +0200 36.3 @@ -409,7 +409,7 @@ 36.4 mgr->add_pool(_metaspace_pool); 36.5 _pools_list->append(_metaspace_pool); 36.6 36.7 - if (UseCompressedKlassPointers) { 36.8 + if (UseCompressedClassPointers) { 36.9 _compressed_class_pool = new CompressedKlassSpacePool(); 36.10 mgr->add_pool(_compressed_class_pool); 36.11 _pools_list->append(_compressed_class_pool);
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 37.2 +++ b/test/gc/arguments/TestCompressedClassFlags.java Mon Aug 12 17:37:02 2013 +0200 37.3 @@ -0,0 +1,49 @@ 37.4 +/* 37.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 37.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 37.7 + * 37.8 + * This code is free software; you can redistribute it and/or modify it 37.9 + * under the terms of the GNU General Public License version 2 only, as 37.10 + * published by the Free Software Foundation. 37.11 + * 37.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 37.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 37.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 37.15 + * version 2 for more details (a copy is included in the LICENSE file that 37.16 + * accompanied this code). 37.17 + * 37.18 + * You should have received a copy of the GNU General Public License version 37.19 + * 2 along with this work; if not, write to the Free Software Foundation, 37.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 37.21 + * 37.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 37.23 + * or visit www.oracle.com if you need additional information or have any 37.24 + * questions. 37.25 + */ 37.26 + 37.27 +import com.oracle.java.testlibrary.*; 37.28 + 37.29 +/* 37.30 + * @test 37.31 + * @bug 8015107 37.32 + * @summary Tests that VM prints a warning when -XX:CompressedClassSpaceSize 37.33 + * is used together with -XX:-UseCompressedClassPointers 37.34 + * @library /testlibrary 37.35 + */ 37.36 +public class TestCompressedClassFlags { 37.37 + public static void main(String[] args) throws Exception { 37.38 + if (Platform.is64bit()) { 37.39 + OutputAnalyzer output = runJava("-XX:CompressedClassSpaceSize=1g", 37.40 + "-XX:-UseCompressedClassPointers", 37.41 + "-version"); 37.42 + output.shouldContain("warning"); 37.43 + output.shouldNotContain("error"); 37.44 + output.shouldHaveExitValue(0); 37.45 + } 37.46 + } 37.47 + 37.48 + private static OutputAnalyzer runJava(String ... args) throws Exception { 37.49 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args); 37.50 + return new OutputAnalyzer(pb.start()); 37.51 + } 37.52 +}
38.1 --- a/test/gc/metaspace/ClassMetaspaceSizeInJmapHeap.java Fri Sep 06 11:11:19 2013 -0700 38.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 38.3 @@ -1,79 +0,0 @@ 38.4 -/* 38.5 - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 38.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 38.7 - * 38.8 - * This code is free software; you can redistribute it and/or modify it 38.9 - * under the terms of the GNU General Public License version 2 only, as 38.10 - * published by the Free Software Foundation. 38.11 - * 38.12 - * This code is distributed in the hope that it will be useful, but WITHOUT 38.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 38.14 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 38.15 - * version 2 for more details (a copy is included in the LICENSE file that 38.16 - * accompanied this code). 38.17 - * 38.18 - * You should have received a copy of the GNU General Public License version 38.19 - * 2 along with this work; if not, write to the Free Software Foundation, 38.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 38.21 - * 38.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 38.23 - * or visit www.oracle.com if you need additional information or have any 38.24 - * questions. 38.25 - */ 38.26 - 38.27 -/* 38.28 - * @test ClassMetaspaceSizeInJmapHeap 38.29 - * @bug 8004924 38.30 - * @summary Checks that jmap -heap contains the flag ClassMetaspaceSize 38.31 - * @library /testlibrary 38.32 - * @run main/othervm -XX:ClassMetaspaceSize=50m ClassMetaspaceSizeInJmapHeap 38.33 - */ 38.34 - 38.35 -import com.oracle.java.testlibrary.*; 38.36 -import java.nio.file.*; 38.37 -import java.io.File; 38.38 -import java.nio.charset.Charset; 38.39 -import java.util.List; 38.40 - 38.41 -public class ClassMetaspaceSizeInJmapHeap { 38.42 - public static void main(String[] args) throws Exception { 38.43 - String pid = Integer.toString(ProcessTools.getProcessId()); 38.44 - 38.45 - JDKToolLauncher jmap = JDKToolLauncher.create("jmap") 38.46 - .addToolArg("-heap") 38.47 - .addToolArg(pid); 38.48 - ProcessBuilder pb = new ProcessBuilder(jmap.getCommand()); 38.49 - 38.50 - File out = new File("ClassMetaspaceSizeInJmapHeap.stdout.txt"); 38.51 - pb.redirectOutput(out); 38.52 - 38.53 - File err = new File("ClassMetaspaceSizeInJmapHeap.stderr.txt"); 38.54 - pb.redirectError(err); 38.55 - 38.56 - run(pb); 38.57 - 38.58 - OutputAnalyzer output = new OutputAnalyzer(read(out)); 38.59 - output.shouldContain("ClassMetaspaceSize = 52428800 (50.0MB)"); 38.60 - out.delete(); 38.61 - } 38.62 - 38.63 - private static void run(ProcessBuilder pb) throws Exception { 38.64 - Process p = pb.start(); 38.65 - p.waitFor(); 38.66 - int exitValue = p.exitValue(); 38.67 - if (exitValue != 0) { 38.68 - throw new Exception("jmap -heap exited with error code: " + exitValue); 38.69 - } 38.70 - } 38.71 - 38.72 - private static String read(File f) throws Exception { 38.73 - Path p = f.toPath(); 38.74 - List<String> lines = Files.readAllLines(p, Charset.defaultCharset()); 38.75 - 38.76 - StringBuilder sb = new StringBuilder(); 38.77 - for (String line : lines) { 38.78 - sb.append(line).append('\n'); 38.79 - } 38.80 - return sb.toString(); 38.81 - } 38.82 -}
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 39.2 +++ b/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java Mon Aug 12 17:37:02 2013 +0200 39.3 @@ -0,0 +1,79 @@ 39.4 +/* 39.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 39.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 39.7 + * 39.8 + * This code is free software; you can redistribute it and/or modify it 39.9 + * under the terms of the GNU General Public License version 2 only, as 39.10 + * published by the Free Software Foundation. 39.11 + * 39.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 39.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 39.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 39.15 + * version 2 for more details (a copy is included in the LICENSE file that 39.16 + * accompanied this code). 39.17 + * 39.18 + * You should have received a copy of the GNU General Public License version 39.19 + * 2 along with this work; if not, write to the Free Software Foundation, 39.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 39.21 + * 39.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 39.23 + * or visit www.oracle.com if you need additional information or have any 39.24 + * questions. 39.25 + */ 39.26 + 39.27 +/* 39.28 + * @test CompressedClassSpaceSizeInJmapHeap 39.29 + * @bug 8004924 39.30 + * @summary Checks that jmap -heap contains the flag CompressedClassSpaceSize 39.31 + * @library /testlibrary 39.32 + * @run main/othervm -XX:CompressedClassSpaceSize=50m CompressedClassSpaceSizeInJmapHeap 39.33 + */ 39.34 + 39.35 +import com.oracle.java.testlibrary.*; 39.36 +import java.nio.file.*; 39.37 +import java.io.File; 39.38 +import java.nio.charset.Charset; 39.39 +import java.util.List; 39.40 + 39.41 +public class CompressedClassSpaceSizeInJmapHeap { 39.42 + public static void main(String[] args) throws Exception { 39.43 + String pid = Integer.toString(ProcessTools.getProcessId()); 39.44 + 39.45 + JDKToolLauncher jmap = JDKToolLauncher.create("jmap") 39.46 + .addToolArg("-heap") 39.47 + .addToolArg(pid); 39.48 + ProcessBuilder pb = new ProcessBuilder(jmap.getCommand()); 39.49 + 39.50 + File out = new File("CompressedClassSpaceSizeInJmapHeap.stdout.txt"); 39.51 + pb.redirectOutput(out); 39.52 + 39.53 + File err = new File("CompressedClassSpaceSizeInJmapHeap.stderr.txt"); 39.54 + pb.redirectError(err); 39.55 + 39.56 + run(pb); 39.57 + 39.58 + OutputAnalyzer output = new OutputAnalyzer(read(out)); 39.59 + output.shouldContain("CompressedClassSpaceSize = 52428800 (50.0MB)"); 39.60 + out.delete(); 39.61 + } 39.62 + 39.63 + private static void run(ProcessBuilder pb) throws Exception { 39.64 + Process p = pb.start(); 39.65 + p.waitFor(); 39.66 + int exitValue = p.exitValue(); 39.67 + if (exitValue != 0) { 39.68 + throw new Exception("jmap -heap exited with error code: " + exitValue); 39.69 + } 39.70 + } 39.71 + 39.72 + private static String read(File f) throws Exception { 39.73 + Path p = f.toPath(); 39.74 + List<String> lines = Files.readAllLines(p, Charset.defaultCharset()); 39.75 + 39.76 + StringBuilder sb = new StringBuilder(); 39.77 + for (String line : lines) { 39.78 + sb.append(line).append('\n'); 39.79 + } 39.80 + return sb.toString(); 39.81 + } 39.82 +}
40.1 --- a/test/gc/metaspace/TestMetaspaceMemoryPool.java Fri Sep 06 11:11:19 2013 -0700 40.2 +++ b/test/gc/metaspace/TestMetaspaceMemoryPool.java Mon Aug 12 17:37:02 2013 +0200 40.3 @@ -36,8 +36,8 @@ 40.4 * MemoryManagerMXBean is created. 40.5 * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops TestMetaspaceMemoryPool 40.6 * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:MaxMetaspaceSize=60m TestMetaspaceMemoryPool 40.7 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedKlassPointers TestMetaspaceMemoryPool 40.8 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedKlassPointers -XX:ClassMetaspaceSize=60m TestMetaspaceMemoryPool 40.9 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers TestMetaspaceMemoryPool 40.10 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:CompressedClassSpaceSize=60m TestMetaspaceMemoryPool 40.11 */ 40.12 public class TestMetaspaceMemoryPool { 40.13 public static void main(String[] args) {
41.1 --- a/test/gc/metaspace/TestMetaspacePerfCounters.java Fri Sep 06 11:11:19 2013 -0700 41.2 +++ b/test/gc/metaspace/TestMetaspacePerfCounters.java Mon Aug 12 17:37:02 2013 +0200 41.3 @@ -33,13 +33,13 @@ 41.4 * @summary Tests that performance counters for metaspace and compressed class 41.5 * space exists and works. 41.6 * 41.7 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters 41.8 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters 41.9 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters 41.10 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters 41.11 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters 41.12 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters 41.13 * 41.14 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedKlassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters 41.15 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedKlassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters 41.16 - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedKlassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters 41.17 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters 41.18 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters 41.19 + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters 41.20 */ 41.21 public class TestMetaspacePerfCounters { 41.22 public static Class fooClass = null; 41.23 @@ -99,6 +99,6 @@ 41.24 } 41.25 41.26 private static boolean isUsingCompressedClassPointers() { 41.27 - return Platform.is64bit() && InputArguments.contains("-XX:+UseCompressedKlassPointers"); 41.28 + return Platform.is64bit() && InputArguments.contains("-XX:+UseCompressedClassPointers"); 41.29 } 41.30 }
42.1 --- a/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java Fri Sep 06 11:11:19 2013 -0700 42.2 +++ b/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java Mon Aug 12 17:37:02 2013 +0200 42.3 @@ -24,7 +24,7 @@ 42.4 /* 42.5 * @test 42.6 * @bug 8003424 42.7 - * @summary Testing UseCompressedKlassPointers with CDS 42.8 + * @summary Testing UseCompressedClassPointers with CDS 42.9 * @library /testlibrary 42.10 * @run main CDSCompressedKPtrs 42.11 */ 42.12 @@ -36,7 +36,7 @@ 42.13 ProcessBuilder pb; 42.14 if (Platform.is64bit()) { 42.15 pb = ProcessTools.createJavaProcessBuilder( 42.16 - "-XX:+UseCompressedKlassPointers", "-XX:+UseCompressedOops", 42.17 + "-XX:+UseCompressedClassPointers", "-XX:+UseCompressedOops", 42.18 "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump"); 42.19 OutputAnalyzer output = new OutputAnalyzer(pb.start()); 42.20 try { 42.21 @@ -44,7 +44,7 @@ 42.22 output.shouldHaveExitValue(0); 42.23 42.24 pb = ProcessTools.createJavaProcessBuilder( 42.25 - "-XX:+UseCompressedKlassPointers", "-XX:+UseCompressedOops", 42.26 + "-XX:+UseCompressedClassPointers", "-XX:+UseCompressedOops", 42.27 "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version"); 42.28 output = new OutputAnalyzer(pb.start()); 42.29 output.shouldContain("sharing");
43.1 --- a/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java Fri Sep 06 11:11:19 2013 -0700 43.2 +++ b/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java Mon Aug 12 17:37:02 2013 +0200 43.3 @@ -24,7 +24,7 @@ 43.4 /* 43.5 * @test 43.6 * @bug 8003424 43.7 - * @summary Test that cannot use CDS if UseCompressedKlassPointers is turned off. 43.8 + * @summary Test that cannot use CDS if UseCompressedClassPointers is turned off. 43.9 * @library /testlibrary 43.10 * @run main CDSCompressedKPtrsError 43.11 */ 43.12 @@ -36,7 +36,7 @@ 43.13 ProcessBuilder pb; 43.14 if (Platform.is64bit()) { 43.15 pb = ProcessTools.createJavaProcessBuilder( 43.16 - "-XX:+UseCompressedOops", "-XX:+UseCompressedKlassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.17 + "-XX:+UseCompressedOops", "-XX:+UseCompressedClassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.18 "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump"); 43.19 OutputAnalyzer output = new OutputAnalyzer(pb.start()); 43.20 try { 43.21 @@ -44,21 +44,21 @@ 43.22 output.shouldHaveExitValue(0); 43.23 43.24 pb = ProcessTools.createJavaProcessBuilder( 43.25 - "-XX:-UseCompressedKlassPointers", "-XX:-UseCompressedOops", 43.26 + "-XX:-UseCompressedClassPointers", "-XX:-UseCompressedOops", 43.27 "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version"); 43.28 output = new OutputAnalyzer(pb.start()); 43.29 output.shouldContain("Unable to use shared archive"); 43.30 output.shouldHaveExitValue(0); 43.31 43.32 pb = ProcessTools.createJavaProcessBuilder( 43.33 - "-XX:-UseCompressedKlassPointers", "-XX:+UseCompressedOops", 43.34 + "-XX:-UseCompressedClassPointers", "-XX:+UseCompressedOops", 43.35 "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version"); 43.36 output = new OutputAnalyzer(pb.start()); 43.37 output.shouldContain("Unable to use shared archive"); 43.38 output.shouldHaveExitValue(0); 43.39 43.40 pb = ProcessTools.createJavaProcessBuilder( 43.41 - "-XX:+UseCompressedKlassPointers", "-XX:-UseCompressedOops", 43.42 + "-XX:+UseCompressedClassPointers", "-XX:-UseCompressedOops", 43.43 "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:on", "-version"); 43.44 output = new OutputAnalyzer(pb.start()); 43.45 output.shouldContain("Unable to use shared archive"); 43.46 @@ -71,19 +71,19 @@ 43.47 43.48 // Test bad options with -Xshare:dump. 43.49 pb = ProcessTools.createJavaProcessBuilder( 43.50 - "-XX:-UseCompressedOops", "-XX:+UseCompressedKlassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.51 + "-XX:-UseCompressedOops", "-XX:+UseCompressedClassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.52 "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump"); 43.53 output = new OutputAnalyzer(pb.start()); 43.54 output.shouldContain("Cannot dump shared archive"); 43.55 43.56 pb = ProcessTools.createJavaProcessBuilder( 43.57 - "-XX:+UseCompressedOops", "-XX:-UseCompressedKlassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.58 + "-XX:+UseCompressedOops", "-XX:-UseCompressedClassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.59 "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump"); 43.60 output = new OutputAnalyzer(pb.start()); 43.61 output.shouldContain("Cannot dump shared archive"); 43.62 43.63 pb = ProcessTools.createJavaProcessBuilder( 43.64 - "-XX:-UseCompressedOops", "-XX:-UseCompressedKlassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.65 + "-XX:-UseCompressedOops", "-XX:-UseCompressedClassPointers", "-XX:+UnlockDiagnosticVMOptions", 43.66 "-XX:SharedArchiveFile=./sample.jsa", "-Xshare:dump"); 43.67 output = new OutputAnalyzer(pb.start()); 43.68 output.shouldContain("Cannot dump shared archive");
44.1 --- a/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java Fri Sep 06 11:11:19 2013 -0700 44.2 +++ b/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java Mon Aug 12 17:37:02 2013 +0200 44.3 @@ -25,7 +25,7 @@ 44.4 * @test 44.5 * @bug 8000968 44.6 * @key regression 44.7 - * @summary NPG: UseCompressedKlassPointers asserts with ObjectAlignmentInBytes=32 44.8 + * @summary NPG: UseCompressedClassPointers asserts with ObjectAlignmentInBytes=32 44.9 * @library /testlibrary 44.10 */ 44.11 44.12 @@ -52,7 +52,7 @@ 44.13 OutputAnalyzer output; 44.14 44.15 pb = ProcessTools.createJavaProcessBuilder( 44.16 - "-XX:+UseCompressedKlassPointers", 44.17 + "-XX:+UseCompressedClassPointers", 44.18 "-XX:+UseCompressedOops", 44.19 "-XX:ObjectAlignmentInBytes=" + alignment, 44.20 "-version");