1659 ResourceMark rm;
1660 task->print_tty();
1661 }
1662 elapsedTimer time;
1663
1664 CompilerThread* thread = CompilerThread::current();
1665 ResourceMark rm(thread);
1666
1667 if (LogEvents) {
1668 _compilation_log->log_compile(thread, task);
1669 }
1670
1671 // Common flags.
1672 uint compile_id = task->compile_id();
1673 int osr_bci = task->osr_bci();
1674 bool is_osr = (osr_bci != standard_entry_bci);
1675 bool should_log = (thread->log() != NULL);
1676 bool should_break = false;
1677 int task_level = task->comp_level();
1678
1679 // Look up matching directives
1680 DirectiveSet* directive = DirectivesStack::getMatchingDirective(task->method(), compiler(task_level));
1681
1682 should_break = directive->BreakAtExecuteOption || task->check_break_at_flags();
1683 if (should_log && !directive->LogOption) {
1684 should_log = false;
1685 }
1686 {
1687 // create the handle inside it's own block so it can't
1688 // accidentally be referenced once the thread transitions to
1689 // native. The NoHandleMark before the transition should catch
1690 // any cases where this occurs in the future.
1691 methodHandle method(thread, task->method());
1692 assert(!method->is_native(), "no longer compile natives");
1693
1694 // Save information about this method in case of failure.
1695 set_last_compile(thread, method, is_osr, task_level);
1696
1697 DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, compiler_name(task_level));
1698 }
1699
1700 // Allocate a new set of JNI handles.
1701 push_jni_handle_block();
1702 Method* target_handle = task->method();
1703 int compilable = ciEnv::MethodCompilable;
1704 AbstractCompiler *comp = compiler(task_level);
1705
1706 int system_dictionary_modification_counter;
1707 {
1708 MutexLocker locker(Compile_lock, thread);
1709 system_dictionary_modification_counter = SystemDictionary::number_of_modifications();
1710 }
1711 #if INCLUDE_JVMCI
1712 if (UseJVMCICompiler && comp != NULL && comp->is_jvmci()) {
1713 JVMCICompiler* jvmci = (JVMCICompiler*) comp;
1714
1715 TraceTime t1("compilation", &time);
1716 EventCompilation event;
1717
|
1659 ResourceMark rm;
1660 task->print_tty();
1661 }
1662 elapsedTimer time;
1663
1664 CompilerThread* thread = CompilerThread::current();
1665 ResourceMark rm(thread);
1666
1667 if (LogEvents) {
1668 _compilation_log->log_compile(thread, task);
1669 }
1670
1671 // Common flags.
1672 uint compile_id = task->compile_id();
1673 int osr_bci = task->osr_bci();
1674 bool is_osr = (osr_bci != standard_entry_bci);
1675 bool should_log = (thread->log() != NULL);
1676 bool should_break = false;
1677 int task_level = task->comp_level();
1678
1679 DirectiveSet* directive;
1680 {
1681 // create the handle inside it's own block so it can't
1682 // accidentally be referenced once the thread transitions to
1683 // native. The NoHandleMark before the transition should catch
1684 // any cases where this occurs in the future.
1685 methodHandle method(thread, task->method());
1686 assert(!method->is_native(), "no longer compile natives");
1687
1688 // Look up matching directives
1689 directive = DirectivesStack::getMatchingDirective(method, compiler(task_level));
1690
1691 // Save information about this method in case of failure.
1692 set_last_compile(thread, method, is_osr, task_level);
1693
1694 DTRACE_METHOD_COMPILE_BEGIN_PROBE(method, compiler_name(task_level));
1695 }
1696
1697 should_break = directive->BreakAtExecuteOption || task->check_break_at_flags();
1698 if (should_log && !directive->LogOption) {
1699 should_log = false;
1700 }
1701
1702 // Allocate a new set of JNI handles.
1703 push_jni_handle_block();
1704 Method* target_handle = task->method();
1705 int compilable = ciEnv::MethodCompilable;
1706 AbstractCompiler *comp = compiler(task_level);
1707
1708 int system_dictionary_modification_counter;
1709 {
1710 MutexLocker locker(Compile_lock, thread);
1711 system_dictionary_modification_counter = SystemDictionary::number_of_modifications();
1712 }
1713 #if INCLUDE_JVMCI
1714 if (UseJVMCICompiler && comp != NULL && comp->is_jvmci()) {
1715 JVMCICompiler* jvmci = (JVMCICompiler*) comp;
1716
1717 TraceTime t1("compilation", &time);
1718 EventCompilation event;
1719
|