hotspot/src/share/vm/compiler/compileBroker.cpp

Print this page




 551 //
 552 // Initialize the Compilation object
 553 void CompileBroker::compilation_init() {
 554   _last_method_compiled[0] = '\0';
 555 
 556   // Set the interface to the current compiler(s).
 557 #ifdef COMPILER1
 558   _compilers[0] = new Compiler();
 559 #ifndef COMPILER2
 560   _compilers[1] = _compilers[0];
 561 #endif
 562 #endif // COMPILER1
 563 
 564 #ifdef COMPILER2
 565   _compilers[1] = new C2Compiler();
 566 #ifndef COMPILER1
 567   _compilers[0] = _compilers[1];
 568 #endif
 569 #endif // COMPILER2
 570 








 571   // Initialize the CompileTask free list
 572   _task_free_list = NULL;
 573 
 574   // Start the CompilerThreads
 575   init_compiler_threads(compiler_count());
 576 
 577 
 578   // totalTime performance counter is always created as it is required
 579   // by the implementation of java.lang.management.CompilationMBean.
 580   {
 581     EXCEPTION_MARK;
 582     _perf_total_compilation =
 583                  PerfDataManager::create_counter(JAVA_CI, "totalTime",
 584                                                  PerfData::U_Ticks, CHECK);
 585   }
 586 
 587 
 588   if (UsePerfData) {
 589 
 590     EXCEPTION_MARK;




 551 //
 552 // Initialize the Compilation object
 553 void CompileBroker::compilation_init() {
 554   _last_method_compiled[0] = '\0';
 555 
 556   // Set the interface to the current compiler(s).
 557 #ifdef COMPILER1
 558   _compilers[0] = new Compiler();
 559 #ifndef COMPILER2
 560   _compilers[1] = _compilers[0];
 561 #endif
 562 #endif // COMPILER1
 563 
 564 #ifdef COMPILER2
 565   _compilers[1] = new C2Compiler();
 566 #ifndef COMPILER1
 567   _compilers[0] = _compilers[1];
 568 #endif
 569 #endif // COMPILER2
 570 
 571 #ifdef SHARK
 572 #if defined(COMPILER1) || defined(COMPILER2)
 573 #error "Can't use COMPILER1 or COMPILER2 with shark"
 574 #endif
 575   _compilers[0] = new SharkCompiler();
 576   _compilers[1] = _compilers[0];  
 577 #endif
 578   
 579   // Initialize the CompileTask free list
 580   _task_free_list = NULL;
 581 
 582   // Start the CompilerThreads
 583   init_compiler_threads(compiler_count());
 584 
 585 
 586   // totalTime performance counter is always created as it is required
 587   // by the implementation of java.lang.management.CompilationMBean.
 588   {
 589     EXCEPTION_MARK;
 590     _perf_total_compilation =
 591                  PerfDataManager::create_counter(JAVA_CI, "totalTime",
 592                                                  PerfData::U_Ticks, CHECK);
 593   }
 594 
 595 
 596   if (UsePerfData) {
 597 
 598     EXCEPTION_MARK;