diff truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java @ 22501:a63bda98cfdb

Extract profiles into separate package. Add isProfilingEnabled in TruffleRuntime to disable profiling in the default runtime; Add low overhead profiles for primitives; Add LoopConditionProfile; Profile footprint/threadsafety improvements; Make toString implementations more consistent; Greatly enhanced javadoc documentation for profiles; Deprecate old profiles
author Christian Humer <christian.humer@oracle.com>
date Wed, 16 Dec 2015 16:38:13 +0100
parents dc83cc1f94f2
children
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java	Wed Dec 16 12:31:17 2015 +0100
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BranchProfile.java	Wed Dec 16 16:38:13 2015 +0100
@@ -29,14 +29,9 @@
 import com.oracle.truffle.api.nodes.NodeCloneable;
 
 /**
- * Utility class to speculate on branches to be never visited. If the {@link #enter()} method is
- * invoked first the optimized code is invalidated and the branch where {@link #enter()} is invoked
- * is enabled for compilation. Otherwise if the {@link #enter()} method was never invoked the branch
- * will not get compiled.
- *
- * All {@code BranchProfile} instances must be held in {@code final} fields for compiler
- * optimizations to take effect.
+ * @deprecated use {@link com.oracle.truffle.api.profiles.BranchProfile} instead
  */
+@Deprecated
 public final class BranchProfile extends NodeCloneable {
 
     @CompilationFinal private boolean visited;
@@ -55,6 +50,10 @@
         return visited;
     }
 
+    /**
+     * @deprecated use {@link com.oracle.truffle.api.profiles.BranchProfile#create()} instead
+     */
+    @Deprecated
     public static BranchProfile create() {
         return new BranchProfile();
     }