SpeculationLog
that can be used to:
FailedSpeculation
s (see
methodData.hpp).HotSpotSpeculationLog
objects.HotSpotSpeculationLog
object.
Modifier and Type | Class and Description |
---|---|
public static class | |
private static class | HotSpotSpeculationLog.
Frees the native memory resources associated with |
Modifier and Type | Field and Description |
---|---|
private byte[][] | failedSpeculations
The list of failed speculations read from native memory via
|
private long | failedSpeculationsAddress
Address of a pointer to a set of failed speculations. |
private final boolean | |
private static final byte[] | |
private List | |
private List | speculations
Speculations made during the compilation associated with this log. |
Access | Constructor and Description |
---|---|
public | |
public | HotSpotSpeculationLog(long
an address in native memory at which the pointer to the
externally managed sailed speculation list resides failedSpeculationsAddress)Creates a speculation log that reads from an externally managed failed speculation list. |
Modifier and Type | Method and Description |
---|---|
public boolean | Returns: false if the speculation could not be appended to the listAdds |
public void | collectFailedSpeculations()
Implements jdk. Updates the set of failed speculations recorded in this log. |
private static boolean | Returns: true if needle is in haystack[fromIndex..haystack.length-1]
|
private static int | |
private static int | |
private static byte[] | |
private static long | |
public long | getFailedSpeculationsAddress()
Gets the address of the pointer to the native failed speculations list. |
pack-priv byte[] | |
public boolean | hasSpeculations()
Implements jdk. Returns if this log has speculations. |
public SpeculationLog. | lookupSpeculation(JavaConstant constant)
Implements jdk. Given a |
public boolean | managesFailedSpeculations()
Returns |
public boolean | Returns: true if the given speculation can be performed, i.e., it never failed so far, otherwise
return false . Note, that this method returns consistent results for any given speculation for the
entire lifetime of the enclosing SpeculationLog object. This means that speculations failed during a
compilation will not be updated.Implements jdk. If this method returns true, the compiler is allowed to |
public SpeculationLog. | speculate(SpeculationLog.
an object representing the reason for the speculation reasonImplements jdk. Registers a speculation performed by the compiler. |
public String |
failedSpeculations | back to summary |
---|---|
private byte[][] failedSpeculations The list of failed speculations read from native memory via
|
failedSpeculationsAddress | back to summary |
---|---|
private long failedSpeculationsAddress Address of a pointer to a set of failed speculations. The address is recorded in the nmethod compiled with this speculation log such that when it fails a speculation, the speculation is added to the list. |
managesFailedSpeculations | back to summary |
---|---|
private final boolean managesFailedSpeculations |
NO_FLATTENED_SPECULATIONS | back to summary |
---|---|
private static final byte[] NO_FLATTENED_SPECULATIONS |
speculationReasons | back to summary |
---|---|
private List<SpeculationLog. |
speculations | back to summary |
---|---|
private List<byte[]> speculations Speculations made during the compilation associated with this log. |
HotSpotSpeculationLog | back to summary |
---|---|
public HotSpotSpeculationLog() Creates a speculation log that manages a failed speculation list. That is, when this object dies, the native resources of the list are freed. |
HotSpotSpeculationLog | back to summary |
---|---|
public HotSpotSpeculationLog(long failedSpeculationsAddress) Creates a speculation log that reads from an externally managed failed speculation list. That is, the lifetime of the list is independent of this object.
|
addFailedSpeculation | back to summary |
---|---|
public boolean addFailedSpeculation(SpeculationLog. Adds
|
collectFailedSpeculations | back to summary |
---|---|
public void collectFailedSpeculations() Implements jdk. Doc from jdk. Updates the set of failed speculations recorded in this log. This must be called before compilation.
|
contains | back to summary |
---|---|
private static boolean contains(byte[][] haystack, int fromIndex, byte[] needle)
|
decodeIndex | back to summary |
---|---|
private static int decodeIndex(long indexAndLength) |
decodeLength | back to summary |
---|---|
private static int decodeLength(long indexAndLength) |
encode | back to summary |
---|---|
private static byte[] encode(SpeculationLog. |
encodeIndexAndLength | back to summary |
---|---|
private static long encodeIndexAndLength(int index, int length) |
getFailedSpeculationsAddress | back to summary |
---|---|
public long getFailedSpeculationsAddress() Gets the address of the pointer to the native failed speculations list.
|
getFlattenedSpeculations | back to summary |
---|---|
pack-priv byte[] getFlattenedSpeculations(boolean validate) |
hasSpeculations | back to summary |
---|---|
public boolean hasSpeculations() Implements jdk. Doc from jdk. Returns if this log has speculations.
|
lookupSpeculation | back to summary |
---|---|
public SpeculationLog. Implements jdk. Doc from jdk. Given a
|
managesFailedSpeculations | back to summary |
---|---|
public boolean managesFailedSpeculations() Returns |
maySpeculate | back to summary |
---|---|
public boolean maySpeculate(SpeculationLog. Implements jdk. Doc from jdk. If this method returns true, the compiler is allowed to
|
speculate | back to summary |
---|---|
public SpeculationLog. Implements jdk. Doc from jdk. Registers a speculation performed by the compiler. The compiler must guard every call to this
method for a specific reason with a call to
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- |
Modifier and Type | Field and Description |
---|---|
private final byte[] | |
private final JavaConstant | id
A speculation id is a long encoding a length (low 5 bits) and an index into a
|
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public JavaConstant | |
public String | toString()
Overrides jdk. Returns a string representation of the object. |
encoding | back to summary |
---|---|
private final byte[] encoding |
id | back to summary |
---|---|
private final JavaConstant id A speculation id is a long encoding a length (low 5 bits) and an index into a
|
HotSpotSpeculation | back to summary |
---|---|
pack-priv HotSpotSpeculation(SpeculationLog. |
getEncoding | back to summary |
---|---|
public JavaConstant getEncoding() |
toString | back to summary |
---|---|
public String toString() Overrides jdk. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- |
HotSpotSpeculationLog
s once they
become reclaimable.
Modifier and Type | Field and Description |
---|---|
pack-priv final long |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
pack-priv boolean | doCleanup()
Implements abstract jdk. Performs the cleanup action now that this object's referent has become weakly reachable. |
address | back to summary |
---|---|
pack-priv final long address |
LogCleaner | back to summary |
---|---|
pack-priv LogCleaner(HotSpotSpeculationLog referent, long address) |
doCleanup | back to summary |
---|---|
pack-priv boolean doCleanup() Implements abstract jdk. Doc from jdk. Performs the cleanup action now that this object's referent has become weakly reachable.
|