< prev index next >

src/hotspot/share/interpreter/bytecodeTracer.cpp

Print this page

536         jint* key         = NEW_RESOURCE_ARRAY(jint, len);
537         jint* dest        = NEW_RESOURCE_ARRAY(jint, len);
538         for (int i = 0; i < len; i++) {
539           key [i] = get_int();
540           dest[i] = bci + get_int();
541         };
542         st->print(" %d %d ", default_dest, len);
543         const char *comma = "";
544         for (int ll = 0; ll < len; ll++)  {
545           st->print("%s " INT32_FORMAT ":" INT32_FORMAT, comma, key[ll], dest[ll]);
546           comma = ",";
547         }
548         st->cr();
549       }
550       break;
551 
552     case Bytecodes::_putstatic:
553     case Bytecodes::_getstatic:
554     case Bytecodes::_putfield:
555     case Bytecodes::_getfield:

556       print_field_or_method(get_index_u2_cpcache(), st);
557       break;
558 
559     case Bytecodes::_invokevirtual:
560     case Bytecodes::_invokespecial:
561     case Bytecodes::_invokestatic:
562       print_field_or_method(get_index_u2_cpcache(), st);
563       break;
564 
565     case Bytecodes::_invokeinterface:
566       { int i = get_index_u2_cpcache();
567         int n = get_index_u1();
568         get_byte();            // ignore zero byte
569         print_field_or_method(i, st);
570       }
571       break;
572 
573     case Bytecodes::_invokedynamic:
574       print_field_or_method(get_index_u4(), st);
575       break;
576 
577     case Bytecodes::_new:
578     case Bytecodes::_checkcast:
579     case Bytecodes::_instanceof:

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

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