changeset 21139:a17dc2584e81

Fix time reporting in multithreaded CTW
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 28 Apr 2015 09:44:23 -0700
parents bf8cbbfabdcf
children 7d2f6dd603b0
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java	Fri Apr 24 12:05:38 2015 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java	Tue Apr 28 09:44:23 2015 -0700
@@ -388,10 +388,14 @@
         if (!running) {
             startThreads();
         }
+        int wakeups = 0;
         while (threadPool.getCompletedTaskCount() != threadPool.getTaskCount()) {
-            TTY.println("CompileTheWorld : Waiting for " + (threadPool.getTaskCount() - threadPool.getCompletedTaskCount()) + " compiles");
+            if (wakeups % 15 == 0) {
+                TTY.println("CompileTheWorld : Waiting for " + (threadPool.getTaskCount() - threadPool.getCompletedTaskCount()) + " compiles");
+            }
             try {
-                threadPool.awaitTermination(15, TimeUnit.SECONDS);
+                threadPool.awaitTermination(1, TimeUnit.SECONDS);
+                wakeups++;
             } catch (InterruptedException e) {
             }
         }