From ddd6138b9519c18cc844d7bab2d8b01fb0c08730 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Fri, 28 Sep 2012 15:34:32 +0200 Subject: [PATCH] 8000230: Change os::print_location to be more descriptive when a location is pointing into an object Reviewed-by: mgerdin, twisti --- hotspot/src/share/vm/runtime/os.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp index 55de8940a5b..6c85d6889ad 100644 --- a/hotspot/src/share/vm/runtime/os.cpp +++ b/hotspot/src/share/vm/runtime/os.cpp @@ -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; }