Class CountingConditionProfile

All Implemented Interfaces:
Cloneable

public final class CountingConditionProfile extends ConditionProfile
Utility class to speculate on conditions to be never true or to be never false. Additionally to BinaryConditionProfile this implementation of ConditionProfile also counts the number of times the condition was true and false. This information is reported to the underlying optimization system using CompilerDirectives.injectBranchProbability(double, boolean). Condition profiles are intended to be used as part of if conditions.
See Also:
  • Method Details

    • profile

      public boolean profile(boolean value)
      Specified by:
      profile in class ConditionProfile
    • getTrueCount

      public int getTrueCount()
    • getFalseCount

      public int getFalseCount()
    • toString

      public String toString()
      Overrides:
      toString in class Object