@@ -869,20 +869,54 @@ void RelocIterator::print_current() {
869869 static_call_Relocation* r = (static_call_Relocation*) reloc ();
870870 tty->print (" | [destination=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT " ]" ,
871871 p2i (r->destination ()), p2i (r->method_value ()));
872+ CodeBlob* cb = CodeCache::find_blob (r->destination ());
873+ if (cb != nullptr ) {
874+ tty->print (" Blob::%s" , cb->name ());
875+ }
872876 break ;
873877 }
874878 case relocInfo::runtime_call_type:
875879 case relocInfo::runtime_call_w_cp_type:
876880 {
877881 CallRelocation* r = (CallRelocation*) reloc ();
878- tty->print (" | [destination=" INTPTR_FORMAT " ]" , p2i (r->destination ()));
882+ address dest = r->destination ();
883+ tty->print (" | [destination=" INTPTR_FORMAT " ]" , p2i (dest));
884+ if (StubRoutines::contains (dest)) {
885+ StubCodeDesc* desc = StubCodeDesc::desc_for (dest);
886+ if (desc == nullptr ) {
887+ desc = StubCodeDesc::desc_for (dest + frame::pc_return_offset);
888+ }
889+ if (desc != nullptr ) {
890+ tty->print (" Stub::%s" , desc->name ());
891+ }
892+ } else {
893+ CodeBlob* cb = CodeCache::find_blob (dest);
894+ if (cb != nullptr ) {
895+ tty->print (" %s" , cb->name ());
896+ } else {
897+ ResourceMark rm;
898+ const int buflen = 1024 ;
899+ char * buf = NEW_RESOURCE_ARRAY (char , buflen);
900+ int offset;
901+ if (os::dll_address_to_function_name (dest, buf, buflen, &offset)) {
902+ tty->print (" %s" , buf);
903+ if (offset != 0 ) {
904+ tty->print (" +%d" , offset);
905+ }
906+ }
907+ }
908+ }
879909 break ;
880910 }
881911 case relocInfo::virtual_call_type:
882912 {
883913 virtual_call_Relocation* r = (virtual_call_Relocation*) reloc ();
884914 tty->print (" | [destination=" INTPTR_FORMAT " cached_value=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT " ]" ,
885915 p2i (r->destination ()), p2i (r->cached_value ()), p2i (r->method_value ()));
916+ CodeBlob* cb = CodeCache::find_blob (r->destination ());
917+ if (cb != nullptr ) {
918+ tty->print (" Blob::%s" , cb->name ());
919+ }
886920 break ;
887921 }
888922 case relocInfo::static_stub_type:
@@ -902,6 +936,10 @@ void RelocIterator::print_current() {
902936 opt_virtual_call_Relocation* r = (opt_virtual_call_Relocation*) reloc ();
903937 tty->print (" | [destination=" INTPTR_FORMAT " metadata=" INTPTR_FORMAT " ]" ,
904938 p2i (r->destination ()), p2i (r->method_value ()));
939+ CodeBlob* cb = CodeCache::find_blob (r->destination ());
940+ if (cb != nullptr ) {
941+ tty->print (" Blob::%s" , cb->name ());
942+ }
905943 break ;
906944 }
907945 default :
0 commit comments