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, wait
toString
private static final ProfilingInfo[] NO_PROFILING_INFO
private final TriState exceptionSeen
DefaultProfilingInfo(TriState exceptionSeen)
public int getCodeSize()
ProfilingInfo
getCodeSize
in interface ProfilingInfo
public JavaTypeProfile getTypeProfile(int bci)
ProfilingInfo
getTypeProfile
in interface ProfilingInfo
public JavaMethodProfile getMethodProfile(int bci)
ProfilingInfo
getMethodProfile
in interface ProfilingInfo
public double getBranchTakenProbability(int bci)
ProfilingInfo
getBranchTakenProbability
in interface ProfilingInfo
public double[] getSwitchProbabilities(int bci)
ProfilingInfo
getSwitchProbabilities
in interface ProfilingInfo
public TriState getExceptionSeen(int bci)
ProfilingInfo
getExceptionSeen
in interface ProfilingInfo
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.public TriState getNullSeen(int bci)
ProfilingInfo
getNullSeen
in interface ProfilingInfo
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.public int getExecutionCount(int bci)
ProfilingInfo
getExecutionCount
in interface ProfilingInfo
public static ProfilingInfo get(TriState exceptionSeen)
public int getDeoptimizationCount(DeoptimizationReason reason)
ProfilingInfo
getDeoptimizationCount
in interface ProfilingInfo
reason
- the reason for which the number of deoptimizations should be queriedpublic boolean isMature()
ProfilingInfo
isMature
in interface ProfilingInfo
public void setMature()
ProfilingInfo
setMature
in interface ProfilingInfo
public boolean setCompilerIRSize(Class<?> irType, int nodeCount)
ProfilingInfo
setCompilerIRSize
in interface ProfilingInfo
irType
- 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)
ProfilingInfo
ProfilingInfo.setCompilerIRSize(Class, int)
.getCompilerIRSize
in interface ProfilingInfo
irType
- the IR type for which the size is being requestedirType