src/share/vm/compiler/compileBroker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8026949 Sdiff src/share/vm/compiler

src/share/vm/compiler/compileBroker.cpp

Print this page




 763                                                          (jlong)_compile_type,
 764                                                           CHECK);
 765 
 766     name = PerfDataManager::counter_name(thread_i, "time");
 767     _perf_time = PerfDataManager::create_counter(SUN_CI, name,
 768                                                  PerfData::U_Ticks, CHECK);
 769 
 770     name = PerfDataManager::counter_name(thread_i, "compiles");
 771     _perf_compiles = PerfDataManager::create_counter(SUN_CI, name,
 772                                                      PerfData::U_Events, CHECK);
 773   }
 774 }
 775 
 776 // ------------------------------------------------------------------
 777 // CompileBroker::compilation_init
 778 //
 779 // Initialize the Compilation object
 780 void CompileBroker::compilation_init() {
 781   _last_method_compiled[0] = '\0';
 782 




 783 #ifndef SHARK
 784   // Set the interface to the current compiler(s).
 785   int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple);
 786   int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
 787 #ifdef COMPILER1
 788   if (c1_count > 0) {
 789     _compilers[0] = new Compiler();
 790   }
 791 #endif // COMPILER1
 792 
 793 #ifdef COMPILER2
 794   if (c2_count > 0) {
 795     _compilers[1] = new C2Compiler();
 796   }
 797 #endif // COMPILER2
 798 
 799 #else // SHARK
 800   int c1_count = 0;
 801   int c2_count = 1;
 802 




 763                                                          (jlong)_compile_type,
 764                                                           CHECK);
 765 
 766     name = PerfDataManager::counter_name(thread_i, "time");
 767     _perf_time = PerfDataManager::create_counter(SUN_CI, name,
 768                                                  PerfData::U_Ticks, CHECK);
 769 
 770     name = PerfDataManager::counter_name(thread_i, "compiles");
 771     _perf_compiles = PerfDataManager::create_counter(SUN_CI, name,
 772                                                      PerfData::U_Events, CHECK);
 773   }
 774 }
 775 
 776 // ------------------------------------------------------------------
 777 // CompileBroker::compilation_init
 778 //
 779 // Initialize the Compilation object
 780 void CompileBroker::compilation_init() {
 781   _last_method_compiled[0] = '\0';
 782 
 783   // No need to initialize compilation system if we do not use it.
 784   if (!UseCompiler) {
 785     return;
 786   }
 787 #ifndef SHARK
 788   // Set the interface to the current compiler(s).
 789   int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple);
 790   int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
 791 #ifdef COMPILER1
 792   if (c1_count > 0) {
 793     _compilers[0] = new Compiler();
 794   }
 795 #endif // COMPILER1
 796 
 797 #ifdef COMPILER2
 798   if (c2_count > 0) {
 799     _compilers[1] = new C2Compiler();
 800   }
 801 #endif // COMPILER2
 802 
 803 #else // SHARK
 804   int c1_count = 0;
 805   int c2_count = 1;
 806 


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