8252543: [JVMCI] Libgraal can deadlock in blocking compilation mode

Reviewed-by: kvn
This commit is contained in:
Doug Simon 2020-09-12 05:26:16 +00:00
parent b1b0f0b2cc
commit 998ce78e53
11 changed files with 112 additions and 54 deletions

View file

@ -31,6 +31,8 @@
#include "memory/allocation.hpp"
#include "utilities/xmlstream.hpp"
JVMCI_ONLY(class JVMCICompileState;)
// CompileTask
//
// An entry in the compile queue. It represents a pending or current
@ -81,8 +83,8 @@ class CompileTask : public CHeapObj<mtCompiler> {
bool _is_blocking;
#if INCLUDE_JVMCI
bool _has_waiter;
// Compiler thread for a blocking JVMCI compilation
CompilerThread* _jvmci_compiler_thread;
// Compilation state for a blocking JVMCI compilation
JVMCICompileState* _blocking_jvmci_compile_state;
#endif
int _comp_level;
int _num_inlined_bytecodes;
@ -144,11 +146,9 @@ class CompileTask : public CHeapObj<mtCompiler> {
bool has_waiter() const { return _has_waiter; }
void clear_waiter() { _has_waiter = false; }
CompilerThread* jvmci_compiler_thread() const { return _jvmci_compiler_thread; }
void set_jvmci_compiler_thread(CompilerThread* t) {
assert(is_blocking(), "must be");
assert((t == NULL) != (_jvmci_compiler_thread == NULL), "must be");
_jvmci_compiler_thread = t;
JVMCICompileState* blocking_jvmci_compile_state() const { return _blocking_jvmci_compile_state; }
void set_blocking_jvmci_compile_state(JVMCICompileState* state) {
_blocking_jvmci_compile_state = state;
}
#endif