comparison src/share/vm/compiler/compileBroker.cpp @ 16447:ce6696559683

better fix for deadlock in GraalVM under -Xcomp (JBS:GRAAL-48)
author Doug Simon <doug.simon@oracle.com>
date Thu, 10 Jul 2014 12:33:32 +0200
parents 4481cf549cfc
children d2aa48d54db5
comparison
equal deleted inserted replaced
16446:4584f29431be 16447:ce6696559683
49 #ifdef COMPILER1 49 #ifdef COMPILER1
50 #include "c1/c1_Compiler.hpp" 50 #include "c1/c1_Compiler.hpp"
51 #endif 51 #endif
52 #ifdef GRAAL 52 #ifdef GRAAL
53 #include "graal/graalCompiler.hpp" 53 #include "graal/graalCompiler.hpp"
54 #ifdef COMPILERGRAAL
55 #include "runtime/vframe.hpp"
56 #endif
54 #endif 57 #endif
55 #ifdef COMPILER2 58 #ifdef COMPILER2
56 #include "opto/c2compiler.hpp" 59 #include "opto/c2compiler.hpp"
57 #endif 60 #endif
58 #ifdef SHARK 61 #ifdef SHARK
1185 1188
1186 // Should this thread wait for completion of the compile? 1189 // Should this thread wait for completion of the compile?
1187 blocking = is_compile_blocking(method, osr_bci); 1190 blocking = is_compile_blocking(method, osr_bci);
1188 1191
1189 #ifdef COMPILERGRAAL 1192 #ifdef COMPILERGRAAL
1190 // Don't allow blocking compiles for requests triggered by Graal. 1193 if (blocking) {
1191 if (blocking && thread->is_Compiler_thread()) { 1194 // Don't allow blocking compiles for requests triggered by Graal.
1192 blocking = false; 1195 if (thread->is_Compiler_thread()) {
1193 } 1196 blocking = false;
1197 }
1198
1199 // Don't allow blocking compiles if inside a class initializer
1200 vframeStream vfst((JavaThread*) thread);
1201 for (; !vfst.at_end(); vfst.next()) {
1202 if (vfst.method()->is_static_initializer()) {
1203 blocking = false;
1204 break;
1205 }
1206 }
1207 }
1208 // Don't allow blocking compiles
1194 #endif 1209 #endif
1195 1210
1196 // We will enter the compilation in the queue. 1211 // We will enter the compilation in the queue.
1197 // 14012000: Note that this sets the queued_for_compile bits in 1212 // 14012000: Note that this sets the queued_for_compile bits in
1198 // the target method. We can now reason that a method cannot be 1213 // the target method. We can now reason that a method cannot be