# HG changeset patch # User Lukas Stadler # Date 1399307949 -7200 # Node ID ef1342e0f9f28870a3887865110b807f3d3bcc40 # Parent a900caddcd6002ff4a281162ff796c35cf51327c# Parent 07fac8558d7b05488b128843afda1d9a60e47956 Merge (update state flag after initialization to allow other compiler threads to execute) diff -r a900caddcd60 -r ef1342e0f9f2 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultVisualizer.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultVisualizer.java Mon May 05 18:38:43 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultVisualizer.java Mon May 05 18:39:09 2014 +0200 @@ -24,8 +24,6 @@ */ package com.oracle.truffle.api.instrument.impl; -import java.io.*; - import com.oracle.truffle.api.*; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.instrument.*; @@ -53,16 +51,7 @@ section = node.getEncapsulatingSourceSection(); estimated = true; } - - String sourceString; - if (section == null || section.getSource() == null) { - sourceString = ""; - } else { - String sourceName = new File(section.getSource().getName()).getName(); - int startLine = section.getStartLine(); - sourceString = String.format("%s:%d%s", sourceName, startLine, estimated ? "~" : ""); - } - return sourceString; + return section.getShortDescription() + (estimated ? "~" : ""); } public String displayMethodName(Node node) { diff -r a900caddcd60 -r ef1342e0f9f2 src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp Mon May 05 18:38:43 2014 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Mon May 05 18:39:09 2014 +0200 @@ -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) { diff -r a900caddcd60 -r ef1342e0f9f2 src/share/vm/graal/graalCompiler.cpp --- a/src/share/vm/graal/graalCompiler.cpp Mon May 05 18:38:43 2014 +0200 +++ b/src/share/vm/graal/graalCompiler.cpp Mon May 05 18:39:09 2014 +0200 @@ -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");