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

*** 3469,3483 **** --- 3469,3499 ---- } #endif // ASSERT add(top, t1, top); // t1 is tlab_size sub(top, ThreadLocalAllocBuffer::alignment_reserve_in_bytes(), top); st_ptr(top, G2_thread, in_bytes(JavaThread::tlab_end_offset())); + + if (ZeroTLAB) { + // This is a fast TLAB refill, therefore the GC is not notified of it. + // So compiled code must fill the new TLAB with zeroes. + ld_ptr(G2_thread, in_bytes(JavaThread::tlab_start_offset()), t2); + zero_memory(t2, t1); + } verify_tlab(); ba(retry); delayed()->nop(); } + void MacroAssembler::zero_memory(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); + } + void MacroAssembler::incr_allocated_bytes(RegisterOrConstant size_in_bytes, Register t1, Register t2) { // Bump total bytes allocated by this thread assert(t1->is_global(), "must be global reg"); // so all 64 bits are saved on a context switch assert_different_registers(size_in_bytes.register_or_noreg(), t1, t2);

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