Mercurial > hg > graal-compiler
changeset 18575:a65c1032f400
Truffle: turn milliseconds in nanoseconds for the time threshold after options have been considered.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Sat, 29 Nov 2014 06:35:00 +0000 |
parents | 88a0c46687d9 |
children | 487c792de3dc |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CounterAndTimeBasedCompilationPolicy.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }