changeset 4171:78fe92fcde6b

Ensure bootstrapping waits until methods are compiled
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Thu, 29 Dec 2011 14:05:08 -0800
parents 6fe63e57244e
children 9c060d6f5f11
files graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/VMExitsNative.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/VMExitsNative.java	Thu Dec 29 14:00:57 2011 -0800
+++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/VMExitsNative.java	Thu Dec 29 14:05:08 2011 -0800
@@ -121,7 +121,7 @@
 
         // Compile until the queue is empty.
         int z = 0;
-        while (compileQueue.getCompletedTaskCount() < compileQueue.getTaskCount()) {
+        while (compileQueue.getCompletedTaskCount() < Math.max(2, compileQueue.getTaskCount())) {
             Thread.sleep(100);
             while (z < compileQueue.getCompletedTaskCount() / 100) {
                 ++z;