< prev index next >

src/share/vm/runtime/os.cpp

Print this page




 971       if (verbose) {
 972         st->print(" for ");
 973         nm->method()->print_value_on(st);
 974       }
 975       st->cr();
 976       nm->print_nmethod(verbose);
 977       return;
 978     }
 979     st->print_cr(INTPTR_FORMAT " is at code_begin+%d in ", p2i(addr), (int)(addr - b->code_begin()));
 980     b->print_on(st);
 981     return;
 982   }
 983 
 984   if (Universe::heap()->is_in(addr)) {
 985     HeapWord* p = Universe::heap()->block_start(addr);
 986     bool print = false;
 987     // If we couldn't find it it just may mean that heap wasn't parsable
 988     // See if we were just given an oop directly
 989     if (p != NULL && Universe::heap()->block_is_obj(p)) {
 990       print = true;
 991     } else if (p == NULL && ((oopDesc*)addr)->is_oop()) {
 992       p = (HeapWord*) addr;
 993       print = true;
 994     }
 995     if (print) {
 996       if (p == (HeapWord*) addr) {
 997         st->print_cr(INTPTR_FORMAT " is an oop", p2i(addr));
 998       } else {
 999         st->print_cr(INTPTR_FORMAT " is pointing into object: " INTPTR_FORMAT, p2i(addr), p2i(p));
1000       }
1001       oop(p)->print_on(st);
1002       return;
1003     }
1004   } else {
1005     if (Universe::heap()->is_in_reserved(addr)) {
1006       st->print_cr(INTPTR_FORMAT " is an unallocated location "
1007                    "in the heap", p2i(addr));
1008       return;
1009     }
1010   }
1011   if (JNIHandles::is_global_handle((jobject) addr)) {




 971       if (verbose) {
 972         st->print(" for ");
 973         nm->method()->print_value_on(st);
 974       }
 975       st->cr();
 976       nm->print_nmethod(verbose);
 977       return;
 978     }
 979     st->print_cr(INTPTR_FORMAT " is at code_begin+%d in ", p2i(addr), (int)(addr - b->code_begin()));
 980     b->print_on(st);
 981     return;
 982   }
 983 
 984   if (Universe::heap()->is_in(addr)) {
 985     HeapWord* p = Universe::heap()->block_start(addr);
 986     bool print = false;
 987     // If we couldn't find it it just may mean that heap wasn't parsable
 988     // See if we were just given an oop directly
 989     if (p != NULL && Universe::heap()->block_is_obj(p)) {
 990       print = true;
 991     } else if (p == NULL && oopDesc::is_oop(oop(addr))) {
 992       p = (HeapWord*) addr;
 993       print = true;
 994     }
 995     if (print) {
 996       if (p == (HeapWord*) addr) {
 997         st->print_cr(INTPTR_FORMAT " is an oop", p2i(addr));
 998       } else {
 999         st->print_cr(INTPTR_FORMAT " is pointing into object: " INTPTR_FORMAT, p2i(addr), p2i(p));
1000       }
1001       oop(p)->print_on(st);
1002       return;
1003     }
1004   } else {
1005     if (Universe::heap()->is_in_reserved(addr)) {
1006       st->print_cr(INTPTR_FORMAT " is an unallocated location "
1007                    "in the heap", p2i(addr));
1008       return;
1009     }
1010   }
1011   if (JNIHandles::is_global_handle((jobject) addr)) {


< prev index next >