changeset 10867:4ead4f35b91f

Truffle: use loopAndInvokeCounter for replace backoff.
author Andreas Woess <andreas.woess@jku.at>
date Tue, 23 Jul 2013 21:42:24 +0200
parents df4d86530e21
children fa2fe7dd7a54
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java	Tue Jul 23 21:21:35 2013 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java	Tue Jul 23 21:42:24 2013 +0200
@@ -192,9 +192,9 @@
         replaceCount++;
 
         // delay compilation until tree is deemed stable enough
-        int replaceBackoff = Math.min(TruffleInvalidationReprofileCount.getValue(), TruffleCompilationThreshold.getValue());
-        if (invokeCounter < replaceBackoff) {
-            invokeCounter = replaceBackoff;
+        int replaceBackoff = TruffleReplaceReprofileCount.getValue();
+        if (loopAndInvokeCounter < replaceBackoff) {
+            loopAndInvokeCounter = replaceBackoff;
         }
     }
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java	Tue Jul 23 21:21:35 2013 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java	Tue Jul 23 21:42:24 2013 +0200
@@ -46,7 +46,9 @@
     @Option(help = "")
     public static final OptionValue<Integer> TruffleCompilationThreshold = new OptionValue<>(1000);
     @Option(help = "")
-    public static final OptionValue<Integer> TruffleInvalidationReprofileCount = new OptionValue<>(10);
+    public static final OptionValue<Integer> TruffleInvalidationReprofileCount = new OptionValue<>(3);
+    @Option(help = "")
+    public static final OptionValue<Integer> TruffleReplaceReprofileCount = new OptionValue<>(10);
     @Option(help = "")
     public static final OptionValue<Integer> TruffleInliningReprofileCount = new OptionValue<>(100);
     @Option(help = "")