changeset 12461:3e559d1db048

make TimedBootstrap work with lower time limits
author twisti
date Wed, 16 Oct 2013 22:06:58 -0700
parents 99ca997f4eae
children 88d451c7c484
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Wed Oct 16 19:49:15 2013 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Wed Oct 16 22:06:58 2013 -0700
@@ -327,6 +327,14 @@
                     TTY.print(".");
                     TTY.flush();
                 }
+
+                // Are we out of time?
+                final int timedBootstrap = TimedBootstrap.getValue();
+                if (timedBootstrap != -1) {
+                    if ((System.currentTimeMillis() - startTime) > timedBootstrap) {
+                        break;
+                    }
+                }
             }
         } while ((System.currentTimeMillis() - startTime) <= TimedBootstrap.getValue());