8000230: Change os::print_location to be more descriptive when a location is pointing into an object

Reviewed-by: mgerdin, twisti
This commit is contained in:
Stefan Karlsson 2012-09-28 15:34:32 +02:00
parent 74f09797c9
commit ddd6138b95

View File

@ -898,7 +898,11 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) {
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;
}