Mercurial > hg > truffle
changeset 15511:ef1342e0f9f2
Merge (update state flag after initialization to allow other compiler threads to execute)
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Mon, 05 May 2014 18:39:09 +0200 |
parents | a900caddcd60 (current diff) 07fac8558d7b (diff) |
children | d968c2db220b |
files | |
diffstat | 3 files changed, 14 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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 = "<unknown source>"; - } 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) {
--- 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) {
--- 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");