Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Thu Jul 10 10:20:55 2014 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Thu Jul 10 12:33:32 2014 +0200 @@ -51,6 +51,9 @@ #endif #ifdef GRAAL #include "graal/graalCompiler.hpp" +#ifdef COMPILERGRAAL +#include "runtime/vframe.hpp" +#endif #endif #ifdef COMPILER2 #include "opto/c2compiler.hpp" @@ -1187,10 +1190,22 @@ blocking = is_compile_blocking(method, osr_bci); #ifdef COMPILERGRAAL - // Don't allow blocking compiles for requests triggered by Graal. - if (blocking && thread->is_Compiler_thread()) { - blocking = false; + if (blocking) { + // Don't allow blocking compiles for requests triggered by Graal. + if (thread->is_Compiler_thread()) { + blocking = false; + } + + // Don't allow blocking compiles if inside a class initializer + vframeStream vfst((JavaThread*) thread); + for (; !vfst.at_end(); vfst.next()) { + if (vfst.method()->is_static_initializer()) { + blocking = false; + break; + } + } } + // Don't allow blocking compiles #endif // We will enter the compilation in the queue.