org.jikesrvm.compilers.baseline
Class SwitchBranchProfile
java.lang.Object
org.jikesrvm.compilers.baseline.BranchProfile
org.jikesrvm.compilers.baseline.SwitchBranchProfile
public final class SwitchBranchProfile
- extends BranchProfile
Profile data for a branch instruction.
Field Summary |
(package private) float[] |
counts
The number of times that the different arms of a switch were
taken. |
counts
final float[] counts
- The number of times that the different arms of a switch were
taken. By convention, the default case is the last entry.
SwitchBranchProfile
SwitchBranchProfile(int _bci,
int[] cs,
int start,
int numEntries)
- Parameters:
_bci
- the bytecode index of the source branch instructioncs
- countsstart
- idx of first entry in csnumEntries
- number of entries in cs for this switch
getDefaultProbability
public float getDefaultProbability()
getCaseProbability
public float getCaseProbability(int n)
getProbability
float getProbability(int n)
toString
public String toString()
- Overrides:
toString
in class Object
sumCounts
private static float sumCounts(int[] counts,
int start,
int numEntries)