diff --git a/src/cpu/ppc/vm/relocInfo_ppc.cpp b/src/cpu/ppc/vm/relocInfo_ppc.cpp index 4f365a46a0513f8f0161955d5eca6bca9e784da3..b48cba0d64d5237565e0cd71e65437bb0701c367 100644 --- a/src/cpu/ppc/vm/relocInfo_ppc.cpp +++ b/src/cpu/ppc/vm/relocInfo_ppc.cpp @@ -62,7 +62,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { nativeMovConstReg_at(addr())->set_narrow_oop(no, code()); } } else { - assert((address) (nativeMovConstReg_at(addr())->data()) == x, "data must match"); + guarantee((address) (nativeMovConstReg_at(addr())->data()) == x, "data must match"); } } diff --git a/src/cpu/sparc/vm/nativeInst_sparc.cpp b/src/cpu/sparc/vm/nativeInst_sparc.cpp index f5ac37cf6facc7cef3aa40d8a6165c3d16f97ebd..413cfe2ec979e44f8c9b40eba38572feeaaca012 100644 --- a/src/cpu/sparc/vm/nativeInst_sparc.cpp +++ b/src/cpu/sparc/vm/nativeInst_sparc.cpp @@ -64,7 +64,7 @@ void NativeInstruction::verify_data64_sethi(address instaddr, intptr_t x) { masm.patchable_sethi(x, destreg); int len = buffer - masm.pc(); for (int i = 0; i < len; i++) { - assert(instaddr[i] == buffer[i], "instructions must match"); + guarantee(instaddr[i] == buffer[i], "instructions must match"); } } diff --git a/src/cpu/sparc/vm/relocInfo_sparc.cpp b/src/cpu/sparc/vm/relocInfo_sparc.cpp index e132c42d4740f3d64f28155c3108958f00d91f83..4900e1407c9f516e3efe9742deed5ea9a1da7d87 100644 --- a/src/cpu/sparc/vm/relocInfo_sparc.cpp +++ b/src/cpu/sparc/vm/relocInfo_sparc.cpp @@ -83,7 +83,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { inst &= ~Assembler::simm( -1, 13); inst |= Assembler::simm(simm13, 13); if (verify_only) { - assert(ip->long_at(0) == inst, "instructions must match"); + guarantee(ip->long_at(0) == inst, "instructions must match"); } else { ip->set_long_at(0, inst); } @@ -101,15 +101,15 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { inst &= ~Assembler::hi22(-1); inst |= Assembler::hi22((intptr_t)np); if (verify_only) { - assert(ip->long_at(0) == inst, "instructions must match"); + guarantee(ip->long_at(0) == inst, "instructions must match"); } else { ip->set_long_at(0, inst); } inst2 = ip->long_at( NativeInstruction::nop_instruction_size ); guarantee(Assembler::inv_op(inst2)==Assembler::arith_op, "arith op"); if (verify_only) { - assert(ip->long_at(NativeInstruction::nop_instruction_size) == NativeInstruction::set_data32_simm13( inst2, (intptr_t)np), - "instructions must match"); + guarantee(ip->long_at(NativeInstruction::nop_instruction_size) == NativeInstruction::set_data32_simm13( inst2, (intptr_t)np), + "instructions must match"); } else { ip->set_long_at(NativeInstruction::nop_instruction_size, NativeInstruction::set_data32_simm13( inst2, (intptr_t)np)); } @@ -126,7 +126,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { inst |= Assembler::hi22((intptr_t)x); // (ignore offset; it doesn't play into the sethi) if (verify_only) { - assert(ip->long_at(0) == inst, "instructions must match"); + guarantee(ip->long_at(0) == inst, "instructions must match"); } else { ip->set_long_at(0, inst); } diff --git a/src/cpu/x86/vm/relocInfo_x86.cpp b/src/cpu/x86/vm/relocInfo_x86.cpp index 14868cb45a1ddc4e6afc10e3afc470a471fad1db..918b6f2088690378c94c0631e4d438d7aa5d0252 100644 --- a/src/cpu/x86/vm/relocInfo_x86.cpp +++ b/src/cpu/x86/vm/relocInfo_x86.cpp @@ -40,7 +40,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { which == Assembler::imm_operand, "format unpacks ok"); if (which == Assembler::imm_operand) { if (verify_only) { - assert(*pd_address_in_code() == x, "instructions must match"); + guarantee(*pd_address_in_code() == x, "instructions must match"); } else { *pd_address_in_code() = x; } @@ -49,13 +49,13 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { // both compressed oops and compressed classes look the same if (Universe::heap()->is_in_reserved((oop)x)) { if (verify_only) { - assert(*(uint32_t*) disp == oopDesc::encode_heap_oop((oop)x), "instructions must match"); + guarantee(*(uint32_t*) disp == oopDesc::encode_heap_oop((oop)x), "instructions must match"); } else { *(int32_t*) disp = oopDesc::encode_heap_oop((oop)x); } } else { if (verify_only) { - assert(*(uint32_t*) disp == Klass::encode_klass((Klass*)x), "instructions must match"); + guarantee(*(uint32_t*) disp == Klass::encode_klass((Klass*)x), "instructions must match"); } else { *(int32_t*) disp = Klass::encode_klass((Klass*)x); } @@ -66,14 +66,14 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { address disp = Assembler::locate_operand(ip, which); address next_ip = Assembler::locate_next_instruction(ip); if (verify_only) { - assert(*(int32_t*) disp == (x - next_ip), "instructions must match"); + guarantee(*(int32_t*) disp == (x - next_ip), "instructions must match"); } else { *(int32_t*) disp = x - next_ip; } } #else if (verify_only) { - assert(*pd_address_in_code() == (x + o), "instructions must match"); + guarantee(*pd_address_in_code() == (x + o), "instructions must match"); } else { *pd_address_in_code() = x + o; } diff --git a/src/share/vm/code/nmethod.cpp b/src/share/vm/code/nmethod.cpp index 6ea39aea98dbdbfbd159aa6b235f4f784fc8b2c2..e20f507a68b2803f2dcfc7d65b762b474de5fa1c 100644 --- a/src/share/vm/code/nmethod.cpp +++ b/src/share/vm/code/nmethod.cpp @@ -2290,7 +2290,7 @@ void nmethod::oops_do_marking_epilogue() { assert(cur != NULL, "not NULL-terminated"); nmethod* next = cur->_oops_do_mark_link; cur->_oops_do_mark_link = NULL; - cur->verify_oop_relocations(); + DEBUG_ONLY(cur->verify_oop_relocations()); NOT_PRODUCT(if (TraceScavenge) cur->print_on(tty, "oops_do, unmark")); cur = next; }