1.1 --- a/src/share/vm/interpreter/bytecodeTracer.cpp Thu Jul 15 08:54:48 2010 -0700 1.2 +++ b/src/share/vm/interpreter/bytecodeTracer.cpp Thu Jul 15 18:40:45 2010 -0700 1.3 @@ -328,24 +328,35 @@ 1.4 constantPoolOop constants = method()->constants(); 1.5 constantTag tag = constants->tag_at(i); 1.6 1.7 - int nt_index = -1; 1.8 + bool has_klass = true; 1.9 1.10 switch (tag.value()) { 1.11 case JVM_CONSTANT_InterfaceMethodref: 1.12 case JVM_CONSTANT_Methodref: 1.13 case JVM_CONSTANT_Fieldref: 1.14 + break; 1.15 case JVM_CONSTANT_NameAndType: 1.16 + case JVM_CONSTANT_InvokeDynamic: 1.17 + has_klass = false; 1.18 break; 1.19 default: 1.20 st->print_cr(" bad tag=%d at %d", tag.value(), i); 1.21 return; 1.22 } 1.23 1.24 - symbolOop klass = constants->klass_name_at(constants->uncached_klass_ref_index_at(i)); 1.25 symbolOop name = constants->uncached_name_ref_at(i); 1.26 symbolOop signature = constants->uncached_signature_ref_at(i); 1.27 const char* sep = (tag.is_field() ? "/" : ""); 1.28 - st->print_cr(" %d <%s.%s%s%s> ", i, klass->as_C_string(), name->as_C_string(), sep, signature->as_C_string()); 1.29 + if (has_klass) { 1.30 + symbolOop klass = constants->klass_name_at(constants->uncached_klass_ref_index_at(i)); 1.31 + st->print_cr(" %d <%s.%s%s%s> ", i, klass->as_C_string(), name->as_C_string(), sep, signature->as_C_string()); 1.32 + } else { 1.33 + if (tag.is_invoke_dynamic()) { 1.34 + int bsm = constants->invoke_dynamic_bootstrap_method_ref_index_at(i); 1.35 + st->print(" bsm=%d", bsm); 1.36 + } 1.37 + st->print_cr(" %d <%s%s%s>", i, name->as_C_string(), sep, signature->as_C_string()); 1.38 + } 1.39 } 1.40 1.41