comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompileTheWorld.java @ 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 3ceda1f37dcc
children 23f9cba1f250 cecb4e39521c
comparison
equal deleted inserted replaced
21116:bf8cbbfabdcf 21139:a17dc2584e81
386 } 386 }
387 387
388 if (!running) { 388 if (!running) {
389 startThreads(); 389 startThreads();
390 } 390 }
391 int wakeups = 0;
391 while (threadPool.getCompletedTaskCount() != threadPool.getTaskCount()) { 392 while (threadPool.getCompletedTaskCount() != threadPool.getTaskCount()) {
392 TTY.println("CompileTheWorld : Waiting for " + (threadPool.getTaskCount() - threadPool.getCompletedTaskCount()) + " compiles"); 393 if (wakeups % 15 == 0) {
394 TTY.println("CompileTheWorld : Waiting for " + (threadPool.getTaskCount() - threadPool.getCompletedTaskCount()) + " compiles");
395 }
393 try { 396 try {
394 threadPool.awaitTermination(15, TimeUnit.SECONDS); 397 threadPool.awaitTermination(1, TimeUnit.SECONDS);
398 wakeups++;
395 } catch (InterruptedException e) { 399 } catch (InterruptedException e) {
396 } 400 }
397 } 401 }
398 threadPool = null; 402 threadPool = null;
399 403