8000230: Change os::print_location to be more descriptive when a location is pointing into an object
Reviewed-by: mgerdin, twisti
--- a/hotspot/src/share/vm/runtime/os.cpp Mon Oct 01 11:07:31 2012 +0200
+++ b/hotspot/src/share/vm/runtime/os.cpp Fri Sep 28 15:34:32 2012 +0200
@@ -898,7 +898,11 @@
print = true;
}
if (print) {
- st->print_cr(INTPTR_FORMAT " is an oop", addr);
+ if (p == (HeapWord*) addr) {
+ st->print_cr(INTPTR_FORMAT " is an oop", addr);
+ } else {
+ st->print_cr(INTPTR_FORMAT " is pointing into object: " INTPTR_FORMAT, addr, p);
+ }
oop(p)->print_on(st);
return;
}