@@ -1767,9 +1767,13 @@ void CodeCache::print_codelist(outputStream* st) {
17671767 nmethod* nm = iter.method ();
17681768 ResourceMark rm;
17691769 char * method_name = nm->method ()->name_and_sig_as_C_string ();
1770- st->print_cr (" %d %d %d %s [" INTPTR_FORMAT " , " INTPTR_FORMAT " - " INTPTR_FORMAT " ]" ,
1770+ const char * jvmci_name = nullptr ;
1771+ #if INCLUDE_JVMCI
1772+ jvmci_name = nm->jvmci_name ();
1773+ #endif
1774+ st->print_cr (" %d %d %d %s%s%s [" INTPTR_FORMAT " , " INTPTR_FORMAT " - " INTPTR_FORMAT " ]" ,
17711775 nm->compile_id (), nm->comp_level (), nm->get_state (),
1772- method_name,
1776+ method_name, jvmci_name ? " jvmci_name= " : " " , jvmci_name ? jvmci_name : " " ,
17731777 (intptr_t )nm->header_begin (), (intptr_t )nm->code_begin (), (intptr_t )nm->code_end ());
17741778 }
17751779}
@@ -1811,12 +1815,20 @@ void CodeCache::write_perf_map(const char* filename, outputStream* st) {
18111815 while (iter.next ()) {
18121816 CodeBlob *cb = iter.method ();
18131817 ResourceMark rm;
1814- const char * method_name =
1815- cb->is_nmethod () ? cb->as_nmethod ()->method ()->external_name ()
1816- : cb->name ();
1817- fs.print_cr (INTPTR_FORMAT " " INTPTR_FORMAT " %s" ,
1818+ const char * method_name = nullptr ;
1819+ const char * jvmci_name = nullptr ;
1820+ if (cb->is_nmethod ()) {
1821+ nmethod* nm = cb->as_nmethod ();
1822+ method_name = nm->method ()->external_name ();
1823+ #if INCLUDE_JVMCI
1824+ jvmci_name = nm->jvmci_name ();
1825+ #endif
1826+ } else {
1827+ method_name = cb->name ();
1828+ }
1829+ fs.print_cr (INTPTR_FORMAT " " INTPTR_FORMAT " %s%s%s" ,
18181830 (intptr_t )cb->code_begin (), (intptr_t )cb->code_size (),
1819- method_name);
1831+ method_name, jvmci_name ? " jvmci_name= " : " " , jvmci_name ? jvmci_name : " " );
18201832 }
18211833}
18221834#endif // LINUX
0 commit comments