1.1 --- a/src/share/vm/oops/constantPoolKlass.cpp Tue Jun 01 11:48:33 2010 -0700 1.2 +++ b/src/share/vm/oops/constantPoolKlass.cpp Wed Jun 02 22:45:42 2010 -0700 1.3 @@ -310,15 +310,12 @@ 1.4 Klass::oop_print_on(obj, st); 1.5 constantPoolOop cp = constantPoolOop(obj); 1.6 if (cp->flags() != 0) { 1.7 - st->print(" - flags : 0x%x", cp->flags()); 1.8 + st->print(" - flags: 0x%x", cp->flags()); 1.9 if (cp->has_pseudo_string()) st->print(" has_pseudo_string"); 1.10 if (cp->has_invokedynamic()) st->print(" has_invokedynamic"); 1.11 st->cr(); 1.12 } 1.13 - 1.14 - // Temp. remove cache so we can do lookups with original indicies. 1.15 - constantPoolCacheHandle cache (THREAD, cp->cache()); 1.16 - cp->set_cache(NULL); 1.17 + st->print_cr(" - cache: " INTPTR_FORMAT, cp->cache()); 1.18 1.19 for (int index = 1; index < cp->length(); index++) { // Index 0 is unused 1.20 st->print(" - %3d : ", index); 1.21 @@ -334,8 +331,8 @@ 1.22 case JVM_CONSTANT_Fieldref : 1.23 case JVM_CONSTANT_Methodref : 1.24 case JVM_CONSTANT_InterfaceMethodref : 1.25 - st->print("klass_index=%d", cp->klass_ref_index_at(index)); 1.26 - st->print(" name_and_type_index=%d", cp->name_and_type_ref_index_at(index)); 1.27 + st->print("klass_index=%d", cp->uncached_klass_ref_index_at(index)); 1.28 + st->print(" name_and_type_index=%d", cp->uncached_name_and_type_ref_index_at(index)); 1.29 break; 1.30 case JVM_CONSTANT_UnresolvedString : 1.31 case JVM_CONSTANT_String : 1.32 @@ -382,9 +379,6 @@ 1.33 st->cr(); 1.34 } 1.35 st->cr(); 1.36 - 1.37 - // Restore cache 1.38 - cp->set_cache(cache()); 1.39 } 1.40 1.41 #endif 1.42 @@ -398,6 +392,9 @@ 1.43 cp->print_address_on(st); 1.44 st->print(" for "); 1.45 cp->pool_holder()->print_value_on(st); 1.46 + if (cp->cache() != NULL) { 1.47 + st->print(" cache=" PTR_FORMAT, cp->cache()); 1.48 + } 1.49 } 1.50 1.51 const char* constantPoolKlass::internal_name() const {