src/share/vm/runtime/os.cpp

Print this page
rev 3642 : 8000230: Change os::print_location to be more descriptive when a location is pointing into an object
Reviewed-by: TBD1, TBD2

@@ -889,11 +889,15 @@
     } else if (p == NULL && ((oopDesc*)addr)->is_oop()) {
       p = (HeapWord*) addr;
       print = true;
     }
     if (print) {
+      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;
     }
   } else {
     if (Universe::heap()->is_in_reserved(addr)) {