Mercurial > hg > graal-jvmci-8
changeset 5269:6b2d030d01ff
Merge
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 20 Apr 2012 15:03:02 +0200 |
parents | b59e32ea3761 (diff) 4e4a868c2b2a (current diff) |
children | e7f3f0541429 |
files | mx/commands.py |
diffstat | 7 files changed, 46 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java Fri Apr 20 14:14:42 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java Fri Apr 20 15:03:02 2012 +0200 @@ -85,13 +85,13 @@ // comilation queue public static int TimedBootstrap = -1; - public static boolean PriorityCompileQueue = ____; + public static boolean PriorityCompileQueue = true; public static int SlowQueueCutoff = 100000; public static boolean SlowCompileThreads = ____; public static boolean DynamicCompilePriority = ____; // graph caching - public static boolean CacheGraphs = ____; + public static boolean CacheGraphs = true; public static int GraphCacheSize = 1000; public static boolean PrintGraphCache = ____; @@ -127,6 +127,7 @@ public static String Meter = null; public static String Time = null; public static String Log = null; + public static String LogFile = null; public static String MethodFilter = null; public static boolean DumpOnError = ____;
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Fri Apr 20 14:14:42 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Fri Apr 20 15:03:02 2012 +0200 @@ -846,7 +846,7 @@ TTY.println("startBlock-ID: " + startBlock.getId()); // bailout of if this occurs in product mode. - throw new CiBailout("liveIn set of first block must be empty"); + throw new GraalInternalError("liveIn set of first block must be empty"); } }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Fri Apr 20 14:14:42 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Fri Apr 20 15:03:02 2012 +0200 @@ -178,23 +178,28 @@ // Compile until the queue is empty. int z = 0; - if (slowCompileQueue == null) { - while (compileQueue.getCompletedTaskCount() < Math.max(3, compileQueue.getTaskCount())) { - Thread.sleep(100); - while (z < compileQueue.getCompletedTaskCount() / 100) { - ++z; - TTY.print("."); - TTY.flush(); + while (true) { + try { + assert !CompilationTask.withinEnqueue.get(); + CompilationTask.withinEnqueue.set(Boolean.TRUE); + if (slowCompileQueue == null) { + if (compileQueue.getCompletedTaskCount() >= Math.max(3, compileQueue.getTaskCount())) { + break; + } + } else { + if (compileQueue.getCompletedTaskCount() + slowCompileQueue.getCompletedTaskCount() >= Math.max(3, compileQueue.getTaskCount() + slowCompileQueue.getTaskCount())) { + break; + } } + } finally { + CompilationTask.withinEnqueue.set(Boolean.FALSE); } - } else { - while (compileQueue.getCompletedTaskCount() + slowCompileQueue.getCompletedTaskCount() < Math.max(3, compileQueue.getTaskCount() + slowCompileQueue.getTaskCount())) { - Thread.sleep(100); - while (z < (compileQueue.getCompletedTaskCount() + slowCompileQueue.getCompletedTaskCount()) / 100) { - ++z; - TTY.print("."); - TTY.flush(); - } + + Thread.sleep(100); + while (z < compileQueue.getCompletedTaskCount() / 100) { + ++z; + TTY.print("."); + TTY.flush(); } } } while ((System.currentTimeMillis() - startTime) <= GraalOptions.TimedBootstrap); @@ -216,9 +221,15 @@ } public void shutdownCompiler() throws Throwable { - compileQueue.shutdown(); - if (slowCompileQueue != null) { - slowCompileQueue.shutdown(); + try { + assert !CompilationTask.withinEnqueue.get(); + CompilationTask.withinEnqueue.set(Boolean.TRUE); + compileQueue.shutdown(); + if (slowCompileQueue != null) { + slowCompileQueue.shutdown(); + } + } finally { + CompilationTask.withinEnqueue.set(Boolean.FALSE); } if (Debug.isEnabled()) {
--- a/mx/commands.py Fri Apr 20 14:14:42 2012 +0200 +++ b/mx/commands.py Fri Apr 20 15:03:02 2012 +0200 @@ -240,7 +240,7 @@ mx.log('Waiting 5 seconds for visualizer to start') time.sleep(5) - vm(['-G:Dump=HelloWorld', '-G:MethodFilter=main', '-Xcomp', '-XX:CompileOnly=HelloWorld::main', '-cp', mx.classpath('com.oracle.graal.examples')] + args + ['examples.HelloWorld']) + vm(['-G:Dump=', '-G:MethodFilter=greet', '-Xcomp', '-XX:CompileOnly=HelloWorld::greet', '-cp', mx.classpath('com.oracle.graal.examples')] + args + ['examples.HelloWorld']) def scaladacapo(args): """run one or all Scala DaCapo benchmarks
--- a/src/cpu/x86/vm/c1_globals_x86.hpp Fri Apr 20 14:14:42 2012 +0200 +++ b/src/cpu/x86/vm/c1_globals_x86.hpp Fri Apr 20 15:03:02 2012 +0200 @@ -52,7 +52,7 @@ #ifdef GRAAL define_pd_global(bool, ProfileTraps, true ); define_pd_global(bool, UseOnStackReplacement, false); -define_pd_global(intx, CompileThreshold, 4500 ); +define_pd_global(intx, CompileThreshold, 2500 ); define_pd_global(intx, InitialCodeCacheSize, 4*M ); define_pd_global(intx, ReservedCodeCacheSize, 48*M ); define_pd_global(bool, ProfileInterpreter, true );
--- a/src/share/vm/runtime/compilationPolicy.cpp Fri Apr 20 14:14:42 2012 +0200 +++ b/src/share/vm/runtime/compilationPolicy.cpp Fri Apr 20 15:03:02 2012 +0200 @@ -443,10 +443,16 @@ jlong current_time = os::javaTimeNanos(); int time_per_call = (int) ((current_time - hot_time) / hot_count); m->set_graal_invocation_time(current_time); - if (m->queued_for_compilation()) { - if (time_per_call < (m->graal_priority() / 5)) { - m->set_graal_priority(time_per_call); - m->clear_queued_for_compilation(); + if (UseNewCode) { + if (m->queued_for_compilation()) { + if (time_per_call < (m->graal_priority() / 5)) { + m->set_graal_priority(time_per_call); + m->clear_queued_for_compilation(); + } + } else { + if (time_per_call < m->graal_priority()) { + m->set_graal_priority(time_per_call); + } } } else { if (time_per_call < m->graal_priority()) { @@ -458,7 +464,6 @@ CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier, m, hot_count, "count", thread); } } - } else { } }
--- a/src/share/vm/runtime/globals.hpp Fri Apr 20 14:14:42 2012 +0200 +++ b/src/share/vm/runtime/globals.hpp Fri Apr 20 15:03:02 2012 +0200 @@ -2507,7 +2507,7 @@ product(intx, CICompilerCount, CI_COMPILER_COUNT, \ "Number of compiler threads to run") \ \ - product(intx, CompilationPolicyChoice, NOT_GRAAL(0) GRAAL_ONLY(0), \ + product(intx, CompilationPolicyChoice, NOT_GRAAL(0) GRAAL_ONLY(4), \ "which compilation policy (0/1)") \ \ develop(bool, UseStackBanging, true, \