src/share/vm/c1/c1_Compilation.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/c1

src/share/vm/c1/c1_Compilation.cpp

Print this page
rev 8995 : 8046155: JEP165: Compiler Control
Summary:
Reviewed-by:


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "c1/c1_CFGPrinter.hpp"
  27 #include "c1/c1_Compilation.hpp"
  28 #include "c1/c1_IR.hpp"
  29 #include "c1/c1_LIRAssembler.hpp"
  30 #include "c1/c1_LinearScan.hpp"
  31 #include "c1/c1_MacroAssembler.hpp"
  32 #include "c1/c1_RangeCheckElimination.hpp"
  33 #include "c1/c1_ValueMap.hpp"
  34 #include "c1/c1_ValueStack.hpp"
  35 #include "code/debugInfoRec.hpp"
  36 #include "compiler/compileLog.hpp"

  37 #include "runtime/sharedRuntime.hpp"
  38 
  39 typedef enum {
  40   _t_compile,
  41     _t_setup,
  42     _t_buildIR,
  43       _t_hir_parse,
  44       _t_gvn,
  45       _t_optimize_blocks,
  46       _t_optimize_null_checks,
  47       _t_rangeCheckElimination,
  48     _t_emit_lir,
  49       _t_linearScan,
  50       _t_lirGeneration,
  51     _t_codeemit,
  52     _t_codeinstall,
  53   max_phase_timers
  54 } TimerName;
  55 
  56 static const char * timer_name[] = {


 427 void Compilation::compile_method() {
 428   {
 429     PhaseTraceTime timeit(_t_setup);
 430 
 431     // setup compilation
 432     initialize();
 433   }
 434 
 435   if (!method()->can_be_compiled()) {
 436     // Prevent race condition 6328518.
 437     // This can happen if the method is obsolete or breakpointed.
 438     bailout("Bailing out because method is not compilable");
 439     return;
 440   }
 441 
 442   if (_env->jvmti_can_hotswap_or_post_breakpoint()) {
 443     // We can assert evol_method because method->can_be_compiled is true.
 444     dependency_recorder()->assert_evol_method(method());
 445   }
 446 
 447   if (method()->break_at_execute()) {
 448     BREAKPOINT;
 449   }
 450 
 451 #ifndef PRODUCT
 452   if (PrintCFGToFile) {
 453     CFGPrinter::print_compilation(this);
 454   }
 455 #endif
 456 
 457   // compile method
 458   int frame_size = compile_java_method();
 459 
 460   // bailout if method couldn't be compiled
 461   // Note: make sure we mark the method as not compilable!
 462   CHECK_BAILOUT();
 463 
 464   if (InstallMethods) {
 465     // install code
 466     PhaseTraceTime timeit(_t_codeinstall);
 467     install_code(frame_size);




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "c1/c1_CFGPrinter.hpp"
  27 #include "c1/c1_Compilation.hpp"
  28 #include "c1/c1_IR.hpp"
  29 #include "c1/c1_LIRAssembler.hpp"
  30 #include "c1/c1_LinearScan.hpp"
  31 #include "c1/c1_MacroAssembler.hpp"
  32 #include "c1/c1_RangeCheckElimination.hpp"
  33 #include "c1/c1_ValueMap.hpp"
  34 #include "c1/c1_ValueStack.hpp"
  35 #include "code/debugInfoRec.hpp"
  36 #include "compiler/compileLog.hpp"
  37 #include "compiler/compilerDirectives.hpp"
  38 #include "runtime/sharedRuntime.hpp"
  39 
  40 typedef enum {
  41   _t_compile,
  42     _t_setup,
  43     _t_buildIR,
  44       _t_hir_parse,
  45       _t_gvn,
  46       _t_optimize_blocks,
  47       _t_optimize_null_checks,
  48       _t_rangeCheckElimination,
  49     _t_emit_lir,
  50       _t_linearScan,
  51       _t_lirGeneration,
  52     _t_codeemit,
  53     _t_codeinstall,
  54   max_phase_timers
  55 } TimerName;
  56 
  57 static const char * timer_name[] = {


 428 void Compilation::compile_method() {
 429   {
 430     PhaseTraceTime timeit(_t_setup);
 431 
 432     // setup compilation
 433     initialize();
 434   }
 435 
 436   if (!method()->can_be_compiled()) {
 437     // Prevent race condition 6328518.
 438     // This can happen if the method is obsolete or breakpointed.
 439     bailout("Bailing out because method is not compilable");
 440     return;
 441   }
 442 
 443   if (_env->jvmti_can_hotswap_or_post_breakpoint()) {
 444     // We can assert evol_method because method->can_be_compiled is true.
 445     dependency_recorder()->assert_evol_method(method());
 446   }
 447 
 448   if (_env->dirset()->BreakAtExecuteOption) {
 449     BREAKPOINT;
 450   }
 451 
 452 #ifndef PRODUCT
 453   if (PrintCFGToFile) {
 454     CFGPrinter::print_compilation(this);
 455   }
 456 #endif
 457 
 458   // compile method
 459   int frame_size = compile_java_method();
 460 
 461   // bailout if method couldn't be compiled
 462   // Note: make sure we mark the method as not compilable!
 463   CHECK_BAILOUT();
 464 
 465   if (InstallMethods) {
 466     // install code
 467     PhaseTraceTime timeit(_t_codeinstall);
 468     install_code(frame_size);


src/share/vm/c1/c1_Compilation.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File