Mercurial > hg > graal-jvmci-8
diff src/share/vm/compiler/compileBroker.cpp @ 18303:ab47ef2f2207
disable blocking compilation requests once GraalRuntime::shutdown has been called
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 07 Nov 2014 12:35:58 +0100 |
parents | 9bb816169777 |
children | 98592ae4b1fa |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Fri Nov 07 12:34:18 2014 +0100 +++ b/src/share/vm/compiler/compileBroker.cpp Fri Nov 07 12:35:58 2014 +0100 @@ -1212,6 +1212,13 @@ if (!GraalRuntime::is_HotSpotGraalRuntime_initialized() && compiler(comp_level)->is_graal()) { blocking = false; } + + // Don't allow blocking compilation requests if we are in GraalRuntime::shutdown + // to avoid deadlock between compiler thread(s) and threads run at shutdown + // such as the DestroyJavaVM thread. + if (GraalRuntime::shutdown_called()) { + blocking = false; + } } // Don't allow blocking compiles #endif