public interface ProfilingInfo
Modifier and Type | Method and Description |
---|---|
double |
getBranchTakenProbability(int bci)
Returns an estimate of how often the branch at the given byte code was taken.
|
int |
getCodeSize()
Returns the length of the bytecodes associated with this profile.
|
int |
getCompilerIRSize(Class<?> irType)
Gets the size of the compiler intermediate representation (IR) associated with this method
last recorded by
setCompilerIRSize(Class, int) . |
int |
getDeoptimizationCount(DeoptimizationReason reason)
Returns how frequently a method was deoptimized for the given deoptimization reason.
|
TriState |
getExceptionSeen(int bci)
Returns information if the given BCI did ever throw an exception.
|
int |
getExecutionCount(int bci)
Returns an estimate how often the current BCI was executed.
|
JavaMethodProfile |
getMethodProfile(int bci)
Returns the MethodProfile for the given BCI.
|
TriState |
getNullSeen(int bci)
Returns information if null was ever seen for the given BCI.
|
double[] |
getSwitchProbabilities(int bci)
Returns an estimate of how often the switch cases are taken at the given BCI.
|
JavaTypeProfile |
getTypeProfile(int bci)
Returns the TypeProfile for the given BCI.
|
boolean |
isMature()
Returns true if the profiling information can be assumed as sufficiently accurate.
|
boolean |
setCompilerIRSize(Class<?> irType,
int irSize)
Records the size of the compiler intermediate representation (IR) associated with this
method.
|
void |
setMature()
Force data to be treated as mature if possible.
|
default String |
toString(ResolvedJavaMethod method,
String sep)
Formats this profiling information to a string.
|
int getCodeSize()
double getBranchTakenProbability(int bci)
double[] getSwitchProbabilities(int bci)
JavaTypeProfile getTypeProfile(int bci)
JavaMethodProfile getMethodProfile(int bci)
TriState getExceptionSeen(int bci)
TriState.TRUE
if the instruction has thrown an exception at least once,
TriState.FALSE
if it never threw an exception, and TriState.UNKNOWN
if this information was not recorded.TriState getNullSeen(int bci)
TriState.TRUE
if null was seen for the instruction, TriState.FALSE
if
null was NOT seen, and TriState.UNKNOWN
if this information was not recorded.int getExecutionCount(int bci)
int getDeoptimizationCount(DeoptimizationReason reason)
reason
- the reason for which the number of deoptimizations should be queriedboolean setCompilerIRSize(Class<?> irType, int irSize)
irType
- the IR type for which the size is being recordedirSize
- the IR size to be recorded. The unit depends on the IR.irType
is supportedint getCompilerIRSize(Class<?> irType)
setCompilerIRSize(Class, int)
.irType
- the IR type for which the size is being requestedirType
boolean isMature()
void setMature()
default String toString(ResolvedJavaMethod method, String sep)
method
- an optional method that augments the profile string returnedsep
- the separator to use for each separate profile record