1652
1653 if (!ci_env.failing() && task->code() == NULL) {
1654 //assert(false, "compiler should always document failure");
1655 // The compiler elected, without comment, not to register a result.
1656 // Do not attempt further compilations of this method.
1657 ci_env.record_method_not_compilable("compile failed", !TieredCompilation);
1658 }
1659
1660 // Copy this bit to the enclosing block:
1661 compilable = ci_env.compilable();
1662
1663 if (ci_env.failing()) {
1664 task->set_failure_reason(ci_env.failure_reason());
1665 ci_env.report_failure(ci_env.failure_reason());
1666 const char* retry_message = ci_env.retry_message();
1667 if (_compilation_log != NULL) {
1668 _compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
1669 }
1670 if (PrintCompilation) {
1671 FormatBufferResource msg = retry_message != NULL ?
1672 err_msg_res("COMPILE SKIPPED: %s (%s)", ci_env.failure_reason(), retry_message) :
1673 err_msg_res("COMPILE SKIPPED: %s", ci_env.failure_reason());
1674 task->print(tty, msg);
1675 }
1676 } else {
1677 task->mark_success();
1678 task->set_num_inlined_bytecodes(ci_env.num_inlined_bytecodes());
1679 if (_compilation_log != NULL) {
1680 nmethod* code = task->code();
1681 if (code != NULL) {
1682 _compilation_log->log_nmethod(thread, code);
1683 }
1684 }
1685 }
1686 // simulate crash during compilation
1687 assert(task->compile_id() != CICrashAt, "just as planned");
1688 if (event.should_commit()) {
1689 event.set_method(target->get_Method());
1690 event.set_compileID(compile_id);
1691 event.set_compileLevel(task->comp_level());
1692 event.set_succeded(task->is_success());
1693 event.set_isOsr(is_osr);
|
1652
1653 if (!ci_env.failing() && task->code() == NULL) {
1654 //assert(false, "compiler should always document failure");
1655 // The compiler elected, without comment, not to register a result.
1656 // Do not attempt further compilations of this method.
1657 ci_env.record_method_not_compilable("compile failed", !TieredCompilation);
1658 }
1659
1660 // Copy this bit to the enclosing block:
1661 compilable = ci_env.compilable();
1662
1663 if (ci_env.failing()) {
1664 task->set_failure_reason(ci_env.failure_reason());
1665 ci_env.report_failure(ci_env.failure_reason());
1666 const char* retry_message = ci_env.retry_message();
1667 if (_compilation_log != NULL) {
1668 _compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
1669 }
1670 if (PrintCompilation) {
1671 FormatBufferResource msg = retry_message != NULL ?
1672 FormatBufferResource("COMPILE SKIPPED: %s (%s)", ci_env.failure_reason(), retry_message) :
1673 FormatBufferResource("COMPILE SKIPPED: %s", ci_env.failure_reason());
1674 task->print(tty, msg);
1675 }
1676 } else {
1677 task->mark_success();
1678 task->set_num_inlined_bytecodes(ci_env.num_inlined_bytecodes());
1679 if (_compilation_log != NULL) {
1680 nmethod* code = task->code();
1681 if (code != NULL) {
1682 _compilation_log->log_nmethod(thread, code);
1683 }
1684 }
1685 }
1686 // simulate crash during compilation
1687 assert(task->compile_id() != CICrashAt, "just as planned");
1688 if (event.should_commit()) {
1689 event.set_method(target->get_Method());
1690 event.set_compileID(compile_id);
1691 event.set_compileLevel(task->comp_level());
1692 event.set_succeded(task->is_success());
1693 event.set_isOsr(is_osr);
|