public final class DefaultProfilingInfo extends Object implements ProfilingInfo
ProfilingInfo that can used in the absence of real profile
information.| Modifier and Type | Field and Description |
|---|---|
private TriState |
exceptionSeen |
private static ProfilingInfo[] |
NO_PROFILING_INFO |
| Constructor and Description |
|---|
DefaultProfilingInfo(TriState exceptionSeen) |
| Modifier and Type | Method and Description |
|---|---|
static ProfilingInfo |
get(TriState exceptionSeen) |
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
ProfilingInfo.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 nodeCount)
Records the size of the compiler intermediate representation (IR) associated with this
method.
|
void |
setMature()
Force data to be treated as mature if possible.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoStringprivate static final ProfilingInfo[] NO_PROFILING_INFO
private final TriState exceptionSeen
DefaultProfilingInfo(TriState exceptionSeen)
public int getCodeSize()
ProfilingInfogetCodeSize in interface ProfilingInfopublic JavaTypeProfile getTypeProfile(int bci)
ProfilingInfogetTypeProfile in interface ProfilingInfopublic JavaMethodProfile getMethodProfile(int bci)
ProfilingInfogetMethodProfile in interface ProfilingInfopublic double getBranchTakenProbability(int bci)
ProfilingInfogetBranchTakenProbability in interface ProfilingInfopublic double[] getSwitchProbabilities(int bci)
ProfilingInfogetSwitchProbabilities in interface ProfilingInfopublic TriState getExceptionSeen(int bci)
ProfilingInfogetExceptionSeen in interface ProfilingInfoTriState.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.public TriState getNullSeen(int bci)
ProfilingInfogetNullSeen in interface ProfilingInfoTriState.TRUE if null was seen for the instruction, TriState.FALSE if
null was NOT seen, and TriState.UNKNOWN if this information was not recorded.public int getExecutionCount(int bci)
ProfilingInfogetExecutionCount in interface ProfilingInfopublic static ProfilingInfo get(TriState exceptionSeen)
public int getDeoptimizationCount(DeoptimizationReason reason)
ProfilingInfogetDeoptimizationCount in interface ProfilingInforeason - the reason for which the number of deoptimizations should be queriedpublic boolean isMature()
ProfilingInfoisMature in interface ProfilingInfopublic void setMature()
ProfilingInfosetMature in interface ProfilingInfopublic boolean setCompilerIRSize(Class<?> irType, int nodeCount)
ProfilingInfosetCompilerIRSize in interface ProfilingInfoirType - the IR type for which the size is being recordednodeCount - the IR size to be recorded. The unit depends on the IR.irType is supportedpublic int getCompilerIRSize(Class<?> irType)
ProfilingInfoProfilingInfo.setCompilerIRSize(Class, int).getCompilerIRSize in interface ProfilingInfoirType - the IR type for which the size is being requestedirType