public final class SwitchBranchProfile extends BranchProfile
Modifier and Type | Field and Description |
---|---|
(package private) float[] |
counts
The number of times that the different arms of a switch were
taken.
|
bci, freq
Constructor and Description |
---|
SwitchBranchProfile(int bci,
int[] cs,
int start,
int numEntries) |
Modifier and Type | Method and Description |
---|---|
float |
getCaseProbability(int n) |
float |
getDefaultProbability() |
(package private) float |
getProbability(int n) |
private static float |
sumCounts(int[] counts,
int start,
int numEntries) |
String |
toString() |
countToFloat, getBytecodeIndex, getFrequency
final float[] counts
SwitchBranchProfile(int bci, int[] cs, int start, int numEntries)
bci
- the bytecode index of the source branch instructioncs
- countsstart
- idx of first entry in csnumEntries
- number of entries in cs for this switchpublic float getDefaultProbability()
public float getCaseProbability(int n)
float getProbability(int n)
private static float sumCounts(int[] counts, int start, int numEntries)