src/hotspot/share/runtime/os.cpp
changeset 57903 5e2576c303a2
parent 57855 00bf1e66de11
child 57998 849acc346a1d
equal deleted inserted replaced
57901:53ed0cf870b0 57903:5e2576c303a2
  1080     b->dump_for_addr(addr, st, verbose);
  1080     b->dump_for_addr(addr, st, verbose);
  1081     return;
  1081     return;
  1082   }
  1082   }
  1083 
  1083 
  1084   // Check if addr points into Java heap.
  1084   // Check if addr points into Java heap.
  1085   if (Universe::heap()->is_in(addr)) {
  1085   if (Universe::heap()->print_location(st, addr)) {
  1086     oop o = oopDesc::oop_or_null(addr);
       
  1087     if (o != NULL) {
       
  1088       if ((HeapWord*)o == (HeapWord*)addr) {
       
  1089         st->print(INTPTR_FORMAT " is an oop: ", p2i(addr));
       
  1090       } else {
       
  1091         st->print(INTPTR_FORMAT " is pointing into object: " , p2i(addr));
       
  1092       }
       
  1093       ResourceMark rm;
       
  1094       o->print_on(st);
       
  1095       return;
       
  1096     }
       
  1097   } else if (Universe::heap()->is_in_reserved(addr)) {
       
  1098     st->print_cr(INTPTR_FORMAT " is an unallocated location in the heap", p2i(addr));
       
  1099     return;
  1086     return;
  1100   }
  1087   }
  1101 
       
  1102   // Compressed oop needs to be decoded first.
       
  1103 #ifdef _LP64
       
  1104   if (UseCompressedOops && ((uintptr_t)addr &~ (uintptr_t)max_juint) == 0) {
       
  1105     narrowOop narrow_oop = (narrowOop)(uintptr_t)addr;
       
  1106     oop o = CompressedOops::decode_raw(narrow_oop);
       
  1107 
       
  1108     if (oopDesc::is_valid(o)) {
       
  1109       st->print(UINT32_FORMAT " is a compressed pointer to object: ", narrow_oop);
       
  1110       o->print_on(st);
       
  1111       return;
       
  1112     }
       
  1113   }
       
  1114 #endif
       
  1115 
  1088 
  1116   bool accessible = is_readable_pointer(addr);
  1089   bool accessible = is_readable_pointer(addr);
  1117 
  1090 
  1118   // Check if addr is a JNI handle.
  1091   // Check if addr is a JNI handle.
  1119   if (align_down((intptr_t)addr, sizeof(intptr_t)) != 0 && accessible) {
  1092   if (align_down((intptr_t)addr, sizeof(intptr_t)) != 0 && accessible) {