changeset 3690:85f1cded9793

8000230: Change os::print_location to be more descriptive when a location is pointing into an object Reviewed-by: mgerdin, twisti
author stefank
date Fri, 28 Sep 2012 15:34:32 +0200
parents 5c8fbbfed964
children 86af3dacab81
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 Oct 01 11:07:31 2012 +0200
+++ b/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;
     }