Request for Review: JDK-8006938: Change os::print_location to be more descriptive when a location is pointing into an object

Christian Thalinger christian.thalinger at oracle.com
Mon Feb 18 12:39:48 PST 2013


On Feb 17, 2013, at 6:59 PM, Poonam Bajaj <poonam.bajaj at oracle.com> wrote:

> Could I have couple of reviews for this small change.
> 
> Webrev: http://cr.openjdk.java.net/~poonam/8006938/webrev.00/

+      if (p == (HeapWord*) addr) {

This compare is hard to follow.  Can't we move the printing into this code, like:

 886     if (p != NULL && Universe::heap()->block_is_obj(p)) {
 896         st->print_cr(INTPTR_FORMAT " is pointing into object: " INTPTR_FORMAT, addr, p);
 887       print = true;
 888     } else if (p == NULL && ((oopDesc*)addr)->is_oop()) {
 894         st->print_cr(INTPTR_FORMAT " is an oop", addr);
 889       p = (HeapWord*) addr;
 890       print = true;
 891     }

-- Chris

> CR: https://jbs.oracle.com/bugs/browse/JDK-8006938
> 
> Change in os::print_location() to print more descriptive information about objects.
> 
> Thanks,
> Poonam
> 
> 



More information about the hotspot-compiler-dev mailing list