< prev index next >

src/cpu/x86/vm/templateTable_x86.cpp

Print this page
rev 12163 : Replace read-barrier in monitor-search-loop with store checks.

*** 4273,4285 **** transition(atos, vtos); // check for NULL object __ null_check(rax); - // We need to preemptively evacuate the object, because we later compare - // it to objects in the BasicObjectLock list, and we might get false negatives - // if another thread evacuates the object in the meantime. See acmp. oopDesc::bs()->interpreter_write_barrier(_masm, rax); const Address monitor_block_top( rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize); const Address monitor_block_bot( --- 4273,4282 ----
*** 4308,4321 **** // check if current entry is used __ cmpptr(Address(rtop, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL_WORD); // if not used then remember entry in rmon __ cmovptr(Assembler::equal, rmon, rtop); // cmov => cmovptr // check if current entry is for same object ! __ movptr(rscratch1, Address(rtop, BasicObjectLock::obj_offset_in_bytes())); ! __ shenandoah_store_addr_check(rscratch1); // Invariant ! oopDesc::bs()->interpreter_read_barrier(_masm, rscratch1); ! __ cmpptr(rax, rscratch1); // if same object then stop searching __ jccb(Assembler::equal, exit); // otherwise advance to next entry __ addptr(rtop, entry_size); __ bind(entry); --- 4305,4316 ---- // check if current entry is used __ cmpptr(Address(rtop, BasicObjectLock::obj_offset_in_bytes()), (int32_t) NULL_WORD); // if not used then remember entry in rmon __ cmovptr(Assembler::equal, rmon, rtop); // cmov => cmovptr // check if current entry is for same object ! __ shenandoah_lock_check(rtop); // Invariant ! __ cmpptr(rax, Address(rtop, BasicObjectLock::obj_offset_in_bytes())); // if same object then stop searching __ jccb(Assembler::equal, exit); // otherwise advance to next entry __ addptr(rtop, entry_size); __ bind(entry);
*** 4379,4391 **** transition(atos, vtos); // check for NULL object __ null_check(rax); - // We need to preemptively evacuate the object, because we later compare - // it to objects in the BasicObjectLock list, and we might get false negatives - // if another thread evacuates the object in the meantime. See acmp. oopDesc::bs()->interpreter_write_barrier(_masm, rax); const Address monitor_block_top( rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize); const Address monitor_block_bot( --- 4374,4383 ----
*** 4406,4419 **** // of monitor block __ jmpb_if_possible(entry); __ bind(loop); // check if current entry is for same object ! __ movptr(rscratch1, Address(rtop, BasicObjectLock::obj_offset_in_bytes())); ! __ shenandoah_store_addr_check(rscratch1); // Invariant ! oopDesc::bs()->interpreter_read_barrier(_masm, rscratch1); ! __ cmpptr(rax, rscratch1); // if same object then stop searching __ jcc(Assembler::equal, found); // otherwise advance to next entry __ addptr(rtop, entry_size); __ bind(entry); --- 4398,4409 ---- // of monitor block __ jmpb_if_possible(entry); __ bind(loop); // check if current entry is for same object ! __ shenandoah_lock_check(rtop); // Invariant ! __ cmpptr(rax, Address(rtop, BasicObjectLock::obj_offset_in_bytes())); // if same object then stop searching __ jcc(Assembler::equal, found); // otherwise advance to next entry __ addptr(rtop, entry_size); __ bind(entry);
< prev index next >