Mercurial > hg > graal-compiler
changeset 15487:07fac8558d7b
update state flag after initialization to allow other compiler threads to execute
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 02 May 2014 17:03:10 -0700 |
parents | 8f09b84f325f |
children | d370d87e528f ef1342e0f9f2 |
files | src/share/vm/compiler/compileBroker.cpp src/share/vm/graal/graalCompiler.cpp |
diffstat | 2 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Fri May 02 16:12:07 2014 -0700 +++ b/src/share/vm/compiler/compileBroker.cpp Fri May 02 17:03:10 2014 -0700 @@ -516,7 +516,8 @@ if (_osr_bci != CompileBroker::standard_entry_bci) { log->print(" osr_bci='%d'", _osr_bci); } - if (_comp_level != CompLevel_highest_tier) { + // Always print the level in tiered. + if (_comp_level != CompLevel_highest_tier || TieredCompilation) { log->print(" level='%d'", _comp_level); } if (_is_blocking) {
--- a/src/share/vm/graal/graalCompiler.cpp Fri May 02 16:12:07 2014 -0700 +++ b/src/share/vm/graal/graalCompiler.cpp Fri May 02 17:03:10 2014 -0700 @@ -58,12 +58,18 @@ NOT_LP64(error("check TLAB allocation code for address space conflicts")); BufferBlob* buffer_blob = initialize_buffer_blob(); - if (buffer_blob == NULL) { - // If we are called from JNI_CreateJavaVM we cannot use set_state yet because it takes a lock. - // set_state(failed); - } else { - // set_state(initialized); +#ifdef COMPILERGRAAL + if (!UseGraalCompilationQueue) { + // This path is used for initialization both by the native queue and the graal queue + // but set_state acquired a lock which might not be safe during JVM_CreateJavaVM, so + // only update the state flag for the native queue. + if (buffer_blob == NULL) { + set_state(failed); + } else { + set_state(initialized); + } } +#endif JNIEnv *env = ((JavaThread *) Thread::current())->jni_environment(); jclass klass = env->FindClass("com/oracle/graal/hotspot/bridge/CompilerToVMImpl");