< prev index next >

src/hotspot/share/interpreter/bytecodeTracer.cpp

Print this page

528         jint* key         = NEW_RESOURCE_ARRAY(jint, len);
529         jint* dest        = NEW_RESOURCE_ARRAY(jint, len);
530         for (int i = 0; i < len; i++) {
531           key [i] = get_int();
532           dest[i] = bci + get_int();
533         };
534         st->print(" %d %d ", default_dest, len);
535         const char *comma = "";
536         for (int ll = 0; ll < len; ll++)  {
537           st->print("%s " INT32_FORMAT ":" INT32_FORMAT, comma, key[ll], dest[ll]);
538           comma = ",";
539         }
540         st->cr();
541       }
542       break;
543 
544     case Bytecodes::_putstatic:
545     case Bytecodes::_getstatic:
546     case Bytecodes::_putfield:
547     case Bytecodes::_getfield:

548       print_field_or_method(get_index_u2_cpcache(), st);
549       break;
550 
551     case Bytecodes::_invokevirtual:
552     case Bytecodes::_invokespecial:
553     case Bytecodes::_invokestatic:
554       print_field_or_method(get_index_u2_cpcache(), st);
555       break;
556 
557     case Bytecodes::_invokeinterface:
558       { int i = get_index_u2_cpcache();
559         int n = get_index_u1();
560         get_byte();            // ignore zero byte
561         print_field_or_method(i, st);
562       }
563       break;
564 
565     case Bytecodes::_invokedynamic:
566       print_field_or_method(get_index_u4(), st);
567       break;
568 
569     case Bytecodes::_new:
570     case Bytecodes::_checkcast:
571     case Bytecodes::_instanceof:

572       { int i = get_index_u2();
573         ConstantPool* constants = method()->constants();
574         Symbol* name = constants->klass_name_at(i);
575         st->print_cr(" %d <%s>", i, name->as_C_string());
576       }
577       break;
578 
579     case Bytecodes::_wide:
580       // length is zero not one, but printed with no more info.
581       break;
582 
583     default:
584       ShouldNotReachHere();
585       break;
586   }
587 }
588 
589 
590 void BytecodePrinter::bytecode_epilog(int bci, outputStream* st) {
591   MethodData* mdo = method()->method_data();

528         jint* key         = NEW_RESOURCE_ARRAY(jint, len);
529         jint* dest        = NEW_RESOURCE_ARRAY(jint, len);
530         for (int i = 0; i < len; i++) {
531           key [i] = get_int();
532           dest[i] = bci + get_int();
533         };
534         st->print(" %d %d ", default_dest, len);
535         const char *comma = "";
536         for (int ll = 0; ll < len; ll++)  {
537           st->print("%s " INT32_FORMAT ":" INT32_FORMAT, comma, key[ll], dest[ll]);
538           comma = ",";
539         }
540         st->cr();
541       }
542       break;
543 
544     case Bytecodes::_putstatic:
545     case Bytecodes::_getstatic:
546     case Bytecodes::_putfield:
547     case Bytecodes::_getfield:
548     case Bytecodes::_withfield:
549       print_field_or_method(get_index_u2_cpcache(), st);
550       break;
551 
552     case Bytecodes::_invokevirtual:
553     case Bytecodes::_invokespecial:
554     case Bytecodes::_invokestatic:
555       print_field_or_method(get_index_u2_cpcache(), st);
556       break;
557 
558     case Bytecodes::_invokeinterface:
559       { int i = get_index_u2_cpcache();
560         int n = get_index_u1();
561         get_byte();            // ignore zero byte
562         print_field_or_method(i, st);
563       }
564       break;
565 
566     case Bytecodes::_invokedynamic:
567       print_field_or_method(get_index_u4(), st);
568       break;
569 
570     case Bytecodes::_new:
571     case Bytecodes::_checkcast:
572     case Bytecodes::_instanceof:
573     case Bytecodes::_defaultvalue:
574       { int i = get_index_u2();
575         ConstantPool* constants = method()->constants();
576         Symbol* name = constants->klass_name_at(i);
577         st->print_cr(" %d <%s>", i, name->as_C_string());
578       }
579       break;
580 
581     case Bytecodes::_wide:
582       // length is zero not one, but printed with no more info.
583       break;
584 
585     default:
586       ShouldNotReachHere();
587       break;
588   }
589 }
590 
591 
592 void BytecodePrinter::bytecode_epilog(int bci, outputStream* st) {
593   MethodData* mdo = method()->method_data();
< prev index next >