public final class HotSpotProfilingInfo extends Object implements ProfilingInfo, HotSpotProxified
Modifier and Type | Field and Description |
---|---|
private HotSpotMethodDataAccessor |
dataAccessor |
private int |
hintBCI |
private int |
hintPosition |
private boolean |
includeNormal |
private boolean |
includeOSR |
private boolean |
isMature |
private HotSpotResolvedJavaMethod |
method |
private HotSpotMethodData |
methodData |
private int |
position |
private static Class<?> |
supportedCompilerIRType
MethodData::_jvmci_ir_size (currently) supports at most one JVMCI compiler IR type
which will be determined by the first JVMCI compiler that calls
setCompilerIRSize(Class, int) . |
Constructor and Description |
---|
HotSpotProfilingInfo(HotSpotMethodData methodData,
HotSpotResolvedJavaMethod method,
boolean includeNormal,
boolean includeOSR) |
Modifier and Type | Method and Description |
---|---|
private void |
extraDataFound(HotSpotMethodDataAccessor data,
int pos) |
private void |
findBCI(int targetBCI,
boolean searchExtraData) |
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.
|
void |
ignoreMature() |
boolean |
isMature()
Returns true if the profiling information can be assumed as sufficiently accurate.
|
private void |
noDataFound(boolean exceptionPossiblyNotRecorded) |
private void |
normalDataFound(HotSpotMethodDataAccessor data,
int pos,
int bci) |
boolean |
setCompilerIRSize(Class<?> irType,
int size)
Records the size of the compiler intermediate representation (IR) associated with this
method.
|
private void |
setCurrentData(HotSpotMethodDataAccessor dataAccessor,
int position) |
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 final HotSpotMethodData methodData
private final HotSpotResolvedJavaMethod method
private boolean isMature
private int position
private int hintPosition
private int hintBCI
private HotSpotMethodDataAccessor dataAccessor
private boolean includeNormal
private boolean includeOSR
private static volatile Class<?> supportedCompilerIRType
MethodData::_jvmci_ir_size
(currently) supports at most one JVMCI compiler IR type
which will be determined by the first JVMCI compiler that calls
setCompilerIRSize(Class, int)
.public HotSpotProfilingInfo(HotSpotMethodData methodData, HotSpotResolvedJavaMethod method, boolean includeNormal, boolean includeOSR)
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 int getDeoptimizationCount(DeoptimizationReason reason)
ProfilingInfo
getDeoptimizationCount
in interface ProfilingInfo
reason
- the reason for which the number of deoptimizations should be queriedprivate void findBCI(int targetBCI, boolean searchExtraData)
private void normalDataFound(HotSpotMethodDataAccessor data, int pos, int bci)
private void extraDataFound(HotSpotMethodDataAccessor data, int pos)
private void noDataFound(boolean exceptionPossiblyNotRecorded)
private void setCurrentData(HotSpotMethodDataAccessor dataAccessor, int position)
public boolean isMature()
ProfilingInfo
isMature
in interface ProfilingInfo
public void ignoreMature()
public void setMature()
ProfilingInfo
setMature
in interface ProfilingInfo
public boolean setCompilerIRSize(Class<?> irType, int size)
ProfilingInfo
setCompilerIRSize
in interface ProfilingInfo
irType
- the IR type for which the size is being recordedsize
- 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