Mercurial > hg > graal-compiler
comparison src/share/vm/compiler/compileBroker.cpp @ 4977:532be189cf09
Reducing diff to hsx24
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 27 Feb 2012 17:06:18 +0100 |
parents | 33df1aeaebbf |
children | 1b8d02e10ee8 |
comparison
equal
deleted
inserted
replaced
4976:8f01f899bccd | 4977:532be189cf09 |
---|---|
725 | 725 |
726 #ifndef SHARK | 726 #ifndef SHARK |
727 // Set the interface to the current compiler(s). | 727 // Set the interface to the current compiler(s). |
728 int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple); | 728 int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple); |
729 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); | 729 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); |
730 #ifdef GRAAL | 730 #if defined(GRAAL) |
731 _compilers[0] = new GraalCompiler(); | 731 _compilers[0] = new GraalCompiler(); |
732 #else | 732 #elif defined(COMPILER1) |
733 #ifdef COMPILER1 | |
734 if (c1_count > 0) { | 733 if (c1_count > 0) { |
735 _compilers[0] = new Compiler(); | 734 _compilers[0] = new Compiler(); |
736 } | 735 } |
737 #endif // COMPILER1 | 736 #endif // COMPILER1 |
738 #endif | |
739 | 737 |
740 #ifdef COMPILER2 | 738 #ifdef COMPILER2 |
741 if (c2_count > 0) { | 739 if (c2_count > 0) { |
742 _compilers[1] = new C2Compiler(); | 740 _compilers[1] = new C2Compiler(); |
743 } | 741 } |
1091 | 1089 |
1092 // Acquire our lock. | 1090 // Acquire our lock. |
1093 { | 1091 { |
1094 MutexLocker locker(queue->lock(), thread); | 1092 MutexLocker locker(queue->lock(), thread); |
1095 | 1093 |
1094 #ifdef GRAAL | |
1096 if (JavaThread::current()->is_compiling() && !BackgroundCompilation) { | 1095 if (JavaThread::current()->is_compiling() && !BackgroundCompilation) { |
1097 #ifdef GRAAL | |
1098 TRACE_graal_1("Recursive compile %s!", method->name_and_sig_as_C_string()); | 1096 TRACE_graal_1("Recursive compile %s!", method->name_and_sig_as_C_string()); |
1099 #endif | |
1100 method->set_not_compilable(); | 1097 method->set_not_compilable(); |
1101 return; | 1098 return; |
1102 } | 1099 } |
1100 #endif | |
1103 | 1101 |
1104 // Make sure the method has not slipped into the queues since | 1102 // Make sure the method has not slipped into the queues since |
1105 // last we checked; note that those checks were "fast bail-outs". | 1103 // last we checked; note that those checks were "fast bail-outs". |
1106 // Here we need to be more careful, see 14012000 below. | 1104 // Here we need to be more careful, see 14012000 below. |
1107 if (compilation_is_in_queue(method, osr_bci)) { | 1105 if (compilation_is_in_queue(method, osr_bci)) { |
1179 method->set_queued_for_compilation(); | 1177 method->set_queued_for_compilation(); |
1180 GraalCompiler::instance()->compile_method(method, osr_bci, blocking); | 1178 GraalCompiler::instance()->compile_method(method, osr_bci, blocking); |
1181 } else { | 1179 } else { |
1182 // Recursive compile request => ignore. | 1180 // Recursive compile request => ignore. |
1183 } | 1181 } |
1184 #endif | 1182 #else |
1185 #ifndef GRAAL | |
1186 if (blocking) { | 1183 if (blocking) { |
1187 wait_for_completion(task); | 1184 wait_for_completion(task); |
1188 } | 1185 } |
1189 #endif | 1186 #endif |
1190 } | 1187 } |