changeset 4236:5e48fb5e9625

8006938: Change os::print_location to be more descriptive when a location is pointing into an object Reviewed-by: stefank, twisti, poonam Contributed-by: sergey.gabdurakhmanov@oracle.com
author poonam
date Tue, 19 Feb 2013 16:03:07 -0800
parents f82f0250456f
children c8304f3d0a6c bc34e24e0637
files src/share/vm/runtime/os.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/os.cpp	Mon Feb 18 14:13:52 2013 +0100
+++ b/src/share/vm/runtime/os.cpp	Tue Feb 19 16:03:07 2013 -0800
@@ -890,7 +890,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);
       if (p != (HeapWord*)x && oop(p)->is_constMethod() &&
           constMethodOop(p)->contains(addr)) {