< 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,11 +2445,11 @@
}
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");
+ 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,19 +4636,19 @@
movl(dst, src);
bind(L);
}
}
-void MacroAssembler::verify_oop(Register reg, const char* s) {
+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", reg->name(), s);
+ 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,20 +4726,20 @@
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) {
+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);
+ 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,11 +5331,11 @@
// 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");
+ verify_oop(r);
if (CompressedOops::base() == NULL) {
if (CompressedOops::shift() != 0) {
assert (LogMinObjAlignmentInBytes == CompressedOops::shift(), "decode alg wrong");
shrq(r, LogMinObjAlignmentInBytes);
}
@@ -5356,11 +5356,11 @@
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");
+ verify_oop(r);
if (CompressedOops::base() != NULL) {
subq(r, r12_heapbase);
}
if (CompressedOops::shift() != 0) {
assert (LogMinObjAlignmentInBytes == CompressedOops::shift(), "decode alg wrong");
@@ -5377,11 +5377,11 @@
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");
+ verify_oop(src);
if (dst != src) {
movq(dst, src);
}
if (CompressedOops::base() != NULL) {
subq(dst, r12_heapbase);
@@ -5406,11 +5406,11 @@
shlq(r, LogMinObjAlignmentInBytes);
jccb(Assembler::equal, done);
addq(r, r12_heapbase);
bind(done);
}
- verify_oop(r, "broken oop in decode_heap_oop");
+ 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 >