< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page
rev 58099 : 8239492: [x86] Turn MacroAssembler::verify_oop into macro recording file and line

*** 2445,2455 **** } void MacroAssembler::get_vm_result(Register oop_result, Register java_thread) { movptr(oop_result, Address(java_thread, JavaThread::vm_result_offset())); movptr(Address(java_thread, JavaThread::vm_result_offset()), NULL_WORD); ! verify_oop(oop_result, "broken oop in call_VM_base"); } void MacroAssembler::get_vm_result_2(Register metadata_result, Register java_thread) { movptr(metadata_result, Address(java_thread, JavaThread::vm_result_2_offset())); movptr(Address(java_thread, JavaThread::vm_result_2_offset()), NULL_WORD); --- 2445,2455 ---- } void MacroAssembler::get_vm_result(Register oop_result, Register java_thread) { movptr(oop_result, Address(java_thread, JavaThread::vm_result_offset())); movptr(Address(java_thread, JavaThread::vm_result_offset()), NULL_WORD); ! verify_oop(oop_result); } void MacroAssembler::get_vm_result_2(Register metadata_result, Register java_thread) { movptr(metadata_result, Address(java_thread, JavaThread::vm_result_2_offset())); movptr(Address(java_thread, JavaThread::vm_result_2_offset()), NULL_WORD);
*** 4636,4654 **** movl(dst, src); bind(L); } } ! void MacroAssembler::verify_oop(Register reg, const char* s) { if (!VerifyOops) return; // Pass register number to verify_oop_subroutine const char* b = NULL; { ResourceMark rm; stringStream ss; ! ss.print("verify_oop: %s: %s", reg->name(), s); b = code_string(ss.as_string()); } BLOCK_COMMENT("verify_oop {"); #ifdef _LP64 push(rscratch1); // save r10, trashed by movptr() --- 4636,4654 ---- movl(dst, src); bind(L); } } ! void MacroAssembler::_verify_oop(Register reg, const char* s, const char* file, int line) { if (!VerifyOops) return; // Pass register number to verify_oop_subroutine const char* b = NULL; { ResourceMark rm; stringStream ss; ! ss.print("verify_oop: %s: %s (%s:%d)", reg->name(), s, file, line); b = code_string(ss.as_string()); } BLOCK_COMMENT("verify_oop {"); #ifdef _LP64 push(rscratch1); // save r10, trashed by movptr()
*** 4726,4745 **** offset += wordSize; // return PC is on stack return Address(rsp, scale_reg, scale_factor, offset); } ! void MacroAssembler::verify_oop_addr(Address addr, const char* s) { if (!VerifyOops) return; // Address adjust(addr.base(), addr.index(), addr.scale(), addr.disp() + BytesPerWord); // Pass register number to verify_oop_subroutine const char* b = NULL; { ResourceMark rm; stringStream ss; ! ss.print("verify_oop_addr: %s", s); b = code_string(ss.as_string()); } #ifdef _LP64 push(rscratch1); // save r10, trashed by movptr() #endif --- 4726,4745 ---- offset += wordSize; // return PC is on stack return Address(rsp, scale_reg, scale_factor, offset); } ! void MacroAssembler::_verify_oop_addr(Address addr, const char* s, const char* file, int line) { if (!VerifyOops) return; // Address adjust(addr.base(), addr.index(), addr.scale(), addr.disp() + BytesPerWord); // Pass register number to verify_oop_subroutine const char* b = NULL; { ResourceMark rm; stringStream ss; ! ss.print("verify_oop_addr: %s (%s:%d)", s, file, line); b = code_string(ss.as_string()); } #ifdef _LP64 push(rscratch1); // save r10, trashed by movptr() #endif
*** 5331,5341 **** // Algorithm must match oop.inline.hpp encode_heap_oop. void MacroAssembler::encode_heap_oop(Register r) { #ifdef ASSERT verify_heapbase("MacroAssembler::encode_heap_oop: heap base corrupted?"); #endif ! verify_oop(r, "broken oop in encode_heap_oop"); if (CompressedOops::base() == NULL) { if (CompressedOops::shift() != 0) { assert (LogMinObjAlignmentInBytes == CompressedOops::shift(), "decode alg wrong"); shrq(r, LogMinObjAlignmentInBytes); } --- 5331,5341 ---- // Algorithm must match oop.inline.hpp encode_heap_oop. void MacroAssembler::encode_heap_oop(Register r) { #ifdef ASSERT verify_heapbase("MacroAssembler::encode_heap_oop: heap base corrupted?"); #endif ! verify_oop(r); if (CompressedOops::base() == NULL) { if (CompressedOops::shift() != 0) { assert (LogMinObjAlignmentInBytes == CompressedOops::shift(), "decode alg wrong"); shrq(r, LogMinObjAlignmentInBytes); }
*** 5356,5366 **** jcc(Assembler::notEqual, ok); STOP("null oop passed to encode_heap_oop_not_null"); bind(ok); } #endif ! verify_oop(r, "broken oop in encode_heap_oop_not_null"); if (CompressedOops::base() != NULL) { subq(r, r12_heapbase); } if (CompressedOops::shift() != 0) { assert (LogMinObjAlignmentInBytes == CompressedOops::shift(), "decode alg wrong"); --- 5356,5366 ---- jcc(Assembler::notEqual, ok); STOP("null oop passed to encode_heap_oop_not_null"); bind(ok); } #endif ! verify_oop(r); if (CompressedOops::base() != NULL) { subq(r, r12_heapbase); } if (CompressedOops::shift() != 0) { assert (LogMinObjAlignmentInBytes == CompressedOops::shift(), "decode alg wrong");
*** 5377,5387 **** jcc(Assembler::notEqual, ok); STOP("null oop passed to encode_heap_oop_not_null2"); bind(ok); } #endif ! verify_oop(src, "broken oop in encode_heap_oop_not_null2"); if (dst != src) { movq(dst, src); } if (CompressedOops::base() != NULL) { subq(dst, r12_heapbase); --- 5377,5387 ---- jcc(Assembler::notEqual, ok); STOP("null oop passed to encode_heap_oop_not_null2"); bind(ok); } #endif ! verify_oop(src); if (dst != src) { movq(dst, src); } if (CompressedOops::base() != NULL) { subq(dst, r12_heapbase);
*** 5406,5416 **** shlq(r, LogMinObjAlignmentInBytes); jccb(Assembler::equal, done); addq(r, r12_heapbase); bind(done); } ! verify_oop(r, "broken oop in decode_heap_oop"); } void MacroAssembler::decode_heap_oop_not_null(Register r) { // Note: it will change flags assert (UseCompressedOops, "should only be used for compressed headers"); --- 5406,5416 ---- shlq(r, LogMinObjAlignmentInBytes); jccb(Assembler::equal, done); addq(r, r12_heapbase); bind(done); } ! verify_oop(r); } void MacroAssembler::decode_heap_oop_not_null(Register r) { // Note: it will change flags assert (UseCompressedOops, "should only be used for compressed headers");
< prev index next >