< prev index next >

src/share/vm/code/nmethod.cpp

Print this page
rev 4131 : 8014431: cleanup warnings indicated by the -Wunused-value compiler option on linux
8015265: revise the fix for 8007037
Reviewed-by: sspitsyn, dholmes, dcubed, coleenp
Contributed-by: jeremymanson@google.com, calvin.cheung@oracle.com


2471 void nmethod::print_relocations() {
2472   ResourceMark m;       // in case methods get printed via the debugger
2473   tty->print_cr("relocations:");
2474   RelocIterator iter(this);
2475   iter.print();
2476   if (UseRelocIndex) {
2477     jint* index_end   = (jint*)relocation_end() - 1;
2478     jint  index_size  = *index_end;
2479     jint* index_start = (jint*)( (address)index_end - index_size );
2480     tty->print_cr("    index @" INTPTR_FORMAT ": index_size=%d", index_start, index_size);
2481     if (index_size > 0) {
2482       jint* ip;
2483       for (ip = index_start; ip+2 <= index_end; ip += 2)
2484         tty->print_cr("  (%d %d) addr=" INTPTR_FORMAT " @" INTPTR_FORMAT,
2485                       ip[0],
2486                       ip[1],
2487                       header_end()+ip[0],
2488                       relocation_begin()-1+ip[1]);
2489       for (; ip < index_end; ip++)
2490         tty->print_cr("  (%d ?)", ip[0]);
2491       tty->print_cr("          @" INTPTR_FORMAT ": index_size=%d", ip, *ip++);

2492       tty->print_cr("reloc_end @" INTPTR_FORMAT ":", ip);
2493     }
2494   }
2495 }
2496 
2497 
2498 void nmethod::print_pcs() {
2499   ResourceMark m;       // in case methods get printed via debugger
2500   tty->print_cr("pc-bytecode offsets:");
2501   for (PcDesc* p = scopes_pcs_begin(); p < scopes_pcs_end(); p++) {
2502     p->print(this);
2503   }
2504 }
2505 
2506 #endif // PRODUCT
2507 
2508 const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
2509   RelocIterator iter(this, begin, end);
2510   bool have_one = false;
2511   while (iter.next()) {




2471 void nmethod::print_relocations() {
2472   ResourceMark m;       // in case methods get printed via the debugger
2473   tty->print_cr("relocations:");
2474   RelocIterator iter(this);
2475   iter.print();
2476   if (UseRelocIndex) {
2477     jint* index_end   = (jint*)relocation_end() - 1;
2478     jint  index_size  = *index_end;
2479     jint* index_start = (jint*)( (address)index_end - index_size );
2480     tty->print_cr("    index @" INTPTR_FORMAT ": index_size=%d", index_start, index_size);
2481     if (index_size > 0) {
2482       jint* ip;
2483       for (ip = index_start; ip+2 <= index_end; ip += 2)
2484         tty->print_cr("  (%d %d) addr=" INTPTR_FORMAT " @" INTPTR_FORMAT,
2485                       ip[0],
2486                       ip[1],
2487                       header_end()+ip[0],
2488                       relocation_begin()-1+ip[1]);
2489       for (; ip < index_end; ip++)
2490         tty->print_cr("  (%d ?)", ip[0]);
2491       tty->print_cr("          @" INTPTR_FORMAT ": index_size=%d", ip, *ip);
2492       ip++;
2493       tty->print_cr("reloc_end @" INTPTR_FORMAT ":", ip);
2494     }
2495   }
2496 }
2497 
2498 
2499 void nmethod::print_pcs() {
2500   ResourceMark m;       // in case methods get printed via debugger
2501   tty->print_cr("pc-bytecode offsets:");
2502   for (PcDesc* p = scopes_pcs_begin(); p < scopes_pcs_end(); p++) {
2503     p->print(this);
2504   }
2505 }
2506 
2507 #endif // PRODUCT
2508 
2509 const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
2510   RelocIterator iter(this, begin, end);
2511   bool have_one = false;
2512   while (iter.next()) {


< prev index next >