# HG changeset patch # User Chris Seaton # Date 1417242900 0 # Node ID a65c1032f4005b3ff399df6f89cd5e8518fa8f31 # Parent 88a0c46687d91c9804debba84f8737ed67bf943f Truffle: turn milliseconds in nanoseconds for the time threshold after options have been considered. diff -r 88a0c46687d9 -r a65c1032f400 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CounterAndTimeBasedCompilationPolicy.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CounterAndTimeBasedCompilationPolicy.java Wed Nov 26 19:27:59 2014 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CounterAndTimeBasedCompilationPolicy.java Sat Nov 29 06:35:00 2014 +0000 @@ -31,7 +31,7 @@ @Override public boolean shouldCompile(CompilationProfile profile, CompilerOptions options) { if (super.shouldCompile(profile, options)) { - long threshold = TruffleTimeThreshold.getValue() * 1_000_000L; + long threshold = TruffleTimeThreshold.getValue(); if (options instanceof GraalCompilerOptions) { threshold = Math.max(threshold, ((GraalCompilerOptions) options).getMinTimeThreshold()); @@ -42,7 +42,7 @@ throw new AssertionError(); } long timeElapsed = System.nanoTime() - time; - if (timeElapsed > threshold) { + if (timeElapsed > threshold * 1_000_000) { profile.deferCompilation(); return false; }