< prev index next >

src/hotspot/share/code/nmethod.cpp

Print this page




2329   for (int i = 0; i < oops_count(); i++) {
2330     oop o = oop_at(i);
2331     tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(o));
2332     if (o == (oop)Universe::non_oop_word()) {
2333       tty->print("non-oop word");
2334     } else {
2335       o->print_value();
2336     }
2337     tty->cr();
2338   }
2339 }
2340 
2341 void nmethod::print_recorded_metadata() {
2342   tty->print_cr("Recorded metadata:");
2343   for (int i = 0; i < metadata_count(); i++) {
2344     Metadata* m = metadata_at(i);
2345     tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(m));
2346     if (m == (Metadata*)Universe::non_oop_word()) {
2347       tty->print("non-metadata word");
2348     } else {
2349       m->print_value_on_maybe_null(tty);
2350     }
2351     tty->cr();
2352   }
2353 }
2354 
2355 #endif // PRODUCT
2356 
2357 const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
2358   RelocIterator iter(this, begin, end);
2359   bool have_one = false;
2360   while (iter.next()) {
2361     have_one = true;
2362     switch (iter.type()) {
2363         case relocInfo::none:                  return "no_reloc";
2364         case relocInfo::oop_type: {
2365           stringStream st;
2366           oop_Relocation* r = iter.oop_reloc();
2367           oop obj = r->oop_value();
2368           st.print("oop(");
2369           if (obj == NULL) st.print("NULL");




2329   for (int i = 0; i < oops_count(); i++) {
2330     oop o = oop_at(i);
2331     tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(o));
2332     if (o == (oop)Universe::non_oop_word()) {
2333       tty->print("non-oop word");
2334     } else {
2335       o->print_value();
2336     }
2337     tty->cr();
2338   }
2339 }
2340 
2341 void nmethod::print_recorded_metadata() {
2342   tty->print_cr("Recorded metadata:");
2343   for (int i = 0; i < metadata_count(); i++) {
2344     Metadata* m = metadata_at(i);
2345     tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(m));
2346     if (m == (Metadata*)Universe::non_oop_word()) {
2347       tty->print("non-metadata word");
2348     } else {
2349       Metadata::print_value_on_maybe_null(tty, m);
2350     }
2351     tty->cr();
2352   }
2353 }
2354 
2355 #endif // PRODUCT
2356 
2357 const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
2358   RelocIterator iter(this, begin, end);
2359   bool have_one = false;
2360   while (iter.next()) {
2361     have_one = true;
2362     switch (iter.type()) {
2363         case relocInfo::none:                  return "no_reloc";
2364         case relocInfo::oop_type: {
2365           stringStream st;
2366           oop_Relocation* r = iter.oop_reloc();
2367           oop obj = r->oop_value();
2368           st.print("oop(");
2369           if (obj == NULL) st.print("NULL");


< prev index next >