--- a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Thu Jul 15 08:54:48 2010 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Thu Jul 15 18:40:45 2010 -0700
@@ -328,24 +328,35 @@
constantPoolOop constants = method()->constants();
constantTag tag = constants->tag_at(i);
- int nt_index = -1;
+ bool has_klass = true;
switch (tag.value()) {
case JVM_CONSTANT_InterfaceMethodref:
case JVM_CONSTANT_Methodref:
case JVM_CONSTANT_Fieldref:
+ break;
case JVM_CONSTANT_NameAndType:
+ case JVM_CONSTANT_InvokeDynamic:
+ has_klass = false;
break;
default:
st->print_cr(" bad tag=%d at %d", tag.value(), i);
return;
}
- symbolOop klass = constants->klass_name_at(constants->uncached_klass_ref_index_at(i));
symbolOop name = constants->uncached_name_ref_at(i);
symbolOop signature = constants->uncached_signature_ref_at(i);
const char* sep = (tag.is_field() ? "/" : "");
- st->print_cr(" %d <%s.%s%s%s> ", i, klass->as_C_string(), name->as_C_string(), sep, signature->as_C_string());
+ if (has_klass) {
+ symbolOop klass = constants->klass_name_at(constants->uncached_klass_ref_index_at(i));
+ st->print_cr(" %d <%s.%s%s%s> ", i, klass->as_C_string(), name->as_C_string(), sep, signature->as_C_string());
+ } else {
+ if (tag.is_invoke_dynamic()) {
+ int bsm = constants->invoke_dynamic_bootstrap_method_ref_index_at(i);
+ st->print(" bsm=%d", bsm);
+ }
+ st->print_cr(" %d <%s%s%s>", i, name->as_C_string(), sep, signature->as_C_string());
+ }
}