< prev index next >

src/hotspot/share/opto/output.cpp

Print this page




1552   if (print_assembly()) {
1553     tty->cr();
1554     tty->print_cr("============================= C2-compiled nmethod ==============================");
1555   }
1556 #endif
1557 
1558 #if defined(SUPPORT_OPTO_ASSEMBLY)
1559   // Dump the assembly code, including basic-block numbers
1560   if (print_assembly()) {
1561     ttyLocker ttyl;  // keep the following output all in one block
1562     if (!VMThread::should_terminate()) {  // test this under the tty lock
1563       // This output goes directly to the tty, not the compiler log.
1564       // To enable tools to match it up with the compilation activity,
1565       // be sure to tag this tty output with the compile ID.
1566       if (xtty != NULL) {
1567         xtty->head("opto_assembly compile_id='%d'%s", compile_id(),
1568                    is_osr_compilation()    ? " compile_kind='osr'" :
1569                    "");
1570       }
1571       if (method() != NULL) {
1572         tty->print_cr("----------------------------------- MetaData -----------------------------------");
1573         method()->print_metadata();
1574       } else if (stub_name() != NULL) {
1575         tty->print_cr("----------------------------- RuntimeStub %s -------------------------------", stub_name());
1576       }
1577       tty->cr();
1578       tty->print_cr("--------------------------------- OptoAssembly ---------------------------------");
1579       dump_asm(node_offsets, node_offset_limit);
1580       tty->print_cr("--------------------------------------------------------------------------------");
1581       if (xtty != NULL) {
1582         // print_metadata and dump_asm above may safepoint which makes us loose the ttylock.
1583         // Retake lock too make sure the end tag is coherent, and that xmlStream->pop_tag is done
1584         // thread safe
1585         ttyLocker ttyl2;
1586         xtty->tail("opto_assembly");
1587       }
1588     }
1589   }
1590 #endif
1591 }
1592 




1552   if (print_assembly()) {
1553     tty->cr();
1554     tty->print_cr("============================= C2-compiled nmethod ==============================");
1555   }
1556 #endif
1557 
1558 #if defined(SUPPORT_OPTO_ASSEMBLY)
1559   // Dump the assembly code, including basic-block numbers
1560   if (print_assembly()) {
1561     ttyLocker ttyl;  // keep the following output all in one block
1562     if (!VMThread::should_terminate()) {  // test this under the tty lock
1563       // This output goes directly to the tty, not the compiler log.
1564       // To enable tools to match it up with the compilation activity,
1565       // be sure to tag this tty output with the compile ID.
1566       if (xtty != NULL) {
1567         xtty->head("opto_assembly compile_id='%d'%s", compile_id(),
1568                    is_osr_compilation()    ? " compile_kind='osr'" :
1569                    "");
1570       }
1571       if (method() != NULL) {
1572         tty->print_cr("--------------------- MetaData for Last Normal Compilation ---------------------");
1573         method()->print_metadata();
1574       } else if (stub_name() != NULL) {
1575         tty->print_cr("----------------------------- RuntimeStub %s -------------------------------", stub_name());
1576       }
1577       tty->cr();
1578       tty->print_cr("--------------------------------- OptoAssembly ---------------------------------");
1579       dump_asm(node_offsets, node_offset_limit);
1580       tty->print_cr("--------------------------------------------------------------------------------");
1581       if (xtty != NULL) {
1582         // print_metadata and dump_asm above may safepoint which makes us loose the ttylock.
1583         // Retake lock too make sure the end tag is coherent, and that xmlStream->pop_tag is done
1584         // thread safe
1585         ttyLocker ttyl2;
1586         xtty->tail("opto_assembly");
1587       }
1588     }
1589   }
1590 #endif
1591 }
1592 


< prev index next >