src/hotspot/share/compiler/compileBroker.cpp
changeset 52025 e75f6076d391
parent 51577 64331e014bc7
child 52336 9ae99ef38c16
equal deleted inserted replaced
52024:257ae7e677c3 52025:e75f6076d391
  1779             CodeCache::free(thread->get_buffer_blob());
  1779             CodeCache::free(thread->get_buffer_blob());
  1780           }
  1780           }
  1781           return; // Stop this thread.
  1781           return; // Stop this thread.
  1782         }
  1782         }
  1783       }
  1783       }
  1784       continue;
  1784     } else {
  1785     }
  1785       // Assign the task to the current thread.  Mark this compilation
  1786 
  1786       // thread as active for the profiler.
  1787     if (UseDynamicNumberOfCompilerThreads) {
  1787       // CompileTaskWrapper also keeps the Method* from being deallocated if redefinition
  1788       possibly_add_compiler_threads();
  1788       // occurs after fetching the compile task off the queue.
  1789     }
  1789       CompileTaskWrapper ctw(task);
  1790 
  1790       nmethodLocker result_handle;  // (handle for the nmethod produced by this task)
  1791     // Assign the task to the current thread.  Mark this compilation
  1791       task->set_code_handle(&result_handle);
  1792     // thread as active for the profiler.
  1792       methodHandle method(thread, task->method());
  1793     CompileTaskWrapper ctw(task);
  1793 
  1794     nmethodLocker result_handle;  // (handle for the nmethod produced by this task)
  1794       // Never compile a method if breakpoints are present in it
  1795     task->set_code_handle(&result_handle);
  1795       if (method()->number_of_breakpoints() == 0) {
  1796     methodHandle method(thread, task->method());
  1796         // Compile the method.
  1797 
  1797         if ((UseCompiler || AlwaysCompileLoopMethods) && CompileBroker::should_compile_new_jobs()) {
  1798     // Never compile a method if breakpoints are present in it
  1798           invoke_compiler_on_method(task);
  1799     if (method()->number_of_breakpoints() == 0) {
  1799           thread->start_idle_timer();
  1800       // Compile the method.
  1800         } else {
  1801       if ((UseCompiler || AlwaysCompileLoopMethods) && CompileBroker::should_compile_new_jobs()) {
  1801           // After compilation is disabled, remove remaining methods from queue
  1802         invoke_compiler_on_method(task);
  1802           method->clear_queued_for_compilation();
  1803         thread->start_idle_timer();
  1803           task->set_failure_reason("compilation is disabled");
  1804       } else {
  1804         }
  1805         // After compilation is disabled, remove remaining methods from queue
  1805       }
  1806         method->clear_queued_for_compilation();
  1806 
  1807         task->set_failure_reason("compilation is disabled");
  1807       if (UseDynamicNumberOfCompilerThreads) {
       
  1808         possibly_add_compiler_threads();
  1808       }
  1809       }
  1809     }
  1810     }
  1810   }
  1811   }
  1811 
  1812 
  1812   // Shut down compiler runtime
  1813   // Shut down compiler runtime