8148507: [JVMCI] mitigate deadlocks related to JVMCI compiler under -Xbatch

Reviewed-by: twisti, dholmes
This commit is contained in:
Doug Simon 2016-02-08 18:52:03 +01:00
parent 7cf2c51fa7
commit 075ed4ea75
4 changed files with 56 additions and 43 deletions

View file

@ -38,7 +38,7 @@ elapsedTimer JVMCICompiler::_codeInstallTimer;
JVMCICompiler::JVMCICompiler() : AbstractCompiler(jvmci) {
_bootstrapping = false;
_methodsCompiled = 0;
_methods_compiled = 0;
assert(_instance == NULL, "only one instance allowed");
_instance = this;
}
@ -99,7 +99,7 @@ void JVMCICompiler::bootstrap() {
} while (first_round && qsize == 0);
first_round = false;
if (PrintBootstrap) {
while (z < (_methodsCompiled / 100)) {
while (z < (_methods_compiled / 100)) {
++z;
tty->print_raw(".");
}
@ -107,7 +107,7 @@ void JVMCICompiler::bootstrap() {
} while (qsize != 0);
if (PrintBootstrap) {
tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methodsCompiled);
tty->print_cr(" in " JLONG_FORMAT " ms (compiled %d methods)", os::javaTimeMillis() - start, _methods_compiled);
}
_bootstrapping = false;
}
@ -176,7 +176,7 @@ void JVMCICompiler::compile_method(const methodHandle& method, int entry_bci, JV
env->set_failure("no nmethod produced", true);
} else {
env->task()->set_num_inlined_bytecodes(CompilationRequestResult::inlinedBytecodes(result_object));
_methodsCompiled++;
Atomic::inc(&_methods_compiled);
}
}
} else {