src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Fri Jan  8 09:42:42 2016
--- new/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Fri Jan  8 09:42:42 2016

*** 203,218 **** --- 203,213 ---- } } void C1_MacroAssembler::initialize_body(Register base, Register index) { ! assert_different_registers(base, index); Label loop; bind(loop); subcc(index, HeapWordSize, index); brx(Assembler::greaterEqual, true, Assembler::pt, loop); delayed()->st_ptr(G0, base, index); ! zero_memory(base, index); } void C1_MacroAssembler::allocate_object( Register obj, // result: pointer to object after successful allocation
*** 235,254 **** --- 230,250 ---- delayed()->nop(); return; } try_allocate(obj, noreg, obj_size * wordSize, t2, t3, slow_case); ! initialize_object(obj, klass, noreg, obj_size * HeapWordSize, t1, t2, /* is_tlab_allocated */ UseTLAB); } void C1_MacroAssembler::initialize_object( Register obj, // result: pointer to object after successful allocation Register klass, // object klass Register var_size_in_bytes, // object size in bytes if unknown at compile time; invalid otherwise int con_size_in_bytes, // object size in bytes if known at compile time Register t1, // temp register ! Register t2 // temp register ! Register t2, // temp register + bool is_tlab_allocated // the object was allocated in a TLAB; relevant for the implementation of ZeroTLAB ) { const int hdr_size_in_bytes = instanceOopDesc::header_size() * HeapWordSize; initialize_header(obj, klass, noreg, t1, t2);
*** 267,276 **** --- 263,273 ---- bind(ok); } #endif + if (!(UseTLAB && ZeroTLAB && is_tlab_allocated)) { // initialize body const int threshold = 5 * HeapWordSize; // approximate break even point for code size if (var_size_in_bytes != noreg) { // use a loop add(obj, hdr_size_in_bytes, t1); // compute address of first element
*** 293,302 **** --- 290,300 ---- add(obj, hdr_size_in_bytes, base); // compute address of first element // compute index = number of words to clear set(con_size_in_bytes - hdr_size_in_bytes, index); initialize_body(base, index); } + } if (CURRENT_ENV->dtrace_alloc_probes()) { assert(obj == O0, "must be"); call(CAST_FROM_FN_PTR(address, Runtime1::entry_for(Runtime1::dtrace_object_alloc_id)), relocInfo::runtime_call_type);

src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File