diff graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java @ 5343:20c14eb46238

added GraalOptions.CheckcastMinHintHitProbability to better guide use of hints for checkcasts
author Doug Simon <doug.simon@oracle.com>
date Wed, 02 May 2012 17:09:00 +0200
parents f536a459c2d3
children 4c3d953f8131
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java	Wed May 02 16:32:00 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalOptions.java	Wed May 02 17:09:00 2012 +0200
@@ -230,7 +230,19 @@
      */
     public static boolean CheckcastCounters = false;
 
+    /**
+     * If the probability that a checkcast will hit one the profiled types (up to {@link #CheckcastMaxHints})
+     * is below this value, the checkcast will be compiled without hints.
+     */
+    public static double CheckcastMinHintHitProbability = 0.5;
+
+    /**
+     * The maximum number of hint types that will be used when compiling a checkcast for which
+     * profiling information is available. Note that {@link #CheckcastMinHintHitProbability}
+     * also influences whether hints are used.
+     */
     public static int CheckcastMaxHints = 2;
+
     public static int InstanceOfMaxHints = 1;
 
     static {