comparison src/share/vm/compiler/compileBroker.cpp @ 14124:7ad529321294

make: remove GRAALVM and introduce COMPILERGRAAL. fix client hosted-mode
author Bernhard Urban <bernhard.urban@jku.at>
date Mon, 10 Mar 2014 16:26:10 +0100
parents 800057208a2c
children 5bf75c95ed56
comparison
equal deleted inserted replaced
14123:dc41eab09fe8 14124:7ad529321294
793 int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple); 793 int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple);
794 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); 794 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
795 #ifdef GRAAL 795 #ifdef GRAAL
796 GraalCompiler* graal = new GraalCompiler(); 796 GraalCompiler* graal = new GraalCompiler();
797 #endif 797 #endif
798 #if defined(GRAALVM) && !defined(TIERED) 798 #if defined(COMPILERGRAAL) && !defined(TIERED)
799 _compilers[0] = graal; 799 _compilers[0] = graal;
800 c1_count = 0; 800 c1_count = 0;
801 c2_count = 0; 801 c2_count = 0;
802 #endif // GRAALVM && !TIERED 802 #endif // COMPILERGRAAL && !TIERED
803 803
804 #ifdef COMPILER1 804 #ifdef COMPILER1
805 if (c1_count > 0) { 805 if (c1_count > 0) {
806 _compilers[0] = new Compiler(); 806 _compilers[0] = new Compiler();
807 } 807 }
808 #endif // COMPILER1 808 #endif // COMPILER1
809 809
810 #if defined(GRAALVM) 810 #if defined(COMPILERGRAAL)
811 _compilers[1] = graal; 811 _compilers[1] = graal;
812 c2_count = 0; 812 c2_count = 0;
813 #endif // GRAALVM 813 #endif // COMPILERGRAAL
814 814
815 #ifdef COMPILER2 815 #ifdef COMPILER2
816 if (c2_count > 0) { 816 if (c2_count > 0) {
817 _compilers[1] = new C2Compiler(); 817 _compilers[1] = new C2Compiler();
818 } 818 }
1012 } 1012 }
1013 1013
1014 1014
1015 void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler_count) { 1015 void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler_count) {
1016 EXCEPTION_MARK; 1016 EXCEPTION_MARK;
1017 #if !defined(ZERO) && !defined(SHARK) && !defined(GRAALVM) 1017 #if !defined(ZERO) && !defined(SHARK) && !defined(COMPILERGRAAL)
1018 assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?"); 1018 assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?");
1019 #endif // !ZERO && !SHARK && !GRAALVM 1019 #endif // !ZERO && !SHARK && !COMPILERGRAAL
1020 // Initialize the compilation queue 1020 // Initialize the compilation queue
1021 if (c2_compiler_count > 0) { 1021 if (c2_compiler_count > 0) {
1022 _c2_method_queue = new CompileQueue("C2MethodQueue", MethodCompileQueue_lock); 1022 _c2_method_queue = new CompileQueue("C2MethodQueue", MethodCompileQueue_lock);
1023 _compilers[1]->set_num_compiler_threads(c2_compiler_count); 1023 _compilers[1]->set_num_compiler_threads(c2_compiler_count);
1024 } 1024 }
1146 // by a compiler thread), and compiled method registration. 1146 // by a compiler thread), and compiled method registration.
1147 if (InstanceRefKlass::owns_pending_list_lock(JavaThread::current())) { 1147 if (InstanceRefKlass::owns_pending_list_lock(JavaThread::current())) {
1148 return; 1148 return;
1149 } 1149 }
1150 1150
1151 #if defined(GRAALVM) 1151 #if defined(COMPILERGRAAL)
1152 // In tiered mode we want to only handle highest tier compiles and 1152 // In tiered mode we want to only handle highest tier compiles and
1153 // in non-tiered mode the default level should be 1153 // in non-tiered mode the default level should be
1154 // CompLevel_full_optimization which equals CompLevel_highest_tier. 1154 // CompLevel_full_optimization which equals CompLevel_highest_tier.
1155 assert(TieredCompilation || comp_level == CompLevel_full_optimization, "incorrect compile level"); 1155 assert(TieredCompilation || comp_level == CompLevel_full_optimization, "incorrect compile level");
1156 assert(CompLevel_full_optimization == CompLevel_highest_tier, "incorrect level definition"); 1156 assert(CompLevel_full_optimization == CompLevel_highest_tier, "incorrect level definition");
1163 // Can't enqueue this request because there would be no one to service it, so simply return. 1163 // Can't enqueue this request because there would be no one to service it, so simply return.
1164 } 1164 }
1165 return; 1165 return;
1166 } 1166 }
1167 assert(TieredCompilation, "should only reach here in tiered mode"); 1167 assert(TieredCompilation, "should only reach here in tiered mode");
1168 #endif // GRAALVM 1168 #endif // COMPILERGRAAL
1169 1169
1170 // Outputs from the following MutexLocker block: 1170 // Outputs from the following MutexLocker block:
1171 CompileTask* task = NULL; 1171 CompileTask* task = NULL;
1172 bool blocking = false; 1172 bool blocking = false;
1173 CompileQueue* queue = compile_queue(comp_level); 1173 CompileQueue* queue = compile_queue(comp_level);