public class HotSpotNmethod extends HotSpotInstalledCode
InstalledCode
for code installed as an nmethod. The nmethod stores a
weak reference to an instance of this class. This is necessary to keep the nmethod from being
unloaded while the associated HotSpotNmethod
instance is alive.
Note that there is no (current) way for the reference from an nmethod to a HotSpotNmethod
instance to be anything but weak. This is due to the fact that HotSpot does not treat nmethods as
strong GC roots.
Modifier and Type | Field and Description |
---|---|
private boolean |
isDefault |
private boolean |
isExternal |
private HotSpotResolvedJavaMethod |
method
This (indirect) Method* reference is safe since class redefinition preserves all methods
associated with nmethods in the code cache.
|
name
Constructor and Description |
---|
HotSpotNmethod(HotSpotResolvedJavaMethod method,
String name,
boolean isDefault) |
HotSpotNmethod(HotSpotResolvedJavaMethod method,
String name,
boolean isDefault,
boolean isExternal) |
Modifier and Type | Method and Description |
---|---|
private boolean |
checkArgs(Object... args) |
protected boolean |
checkThreeObjectArgs() |
Object |
executeVarargs(Object... args) |
ResolvedJavaMethod |
getMethod() |
long |
getStart() |
void |
invalidate() |
boolean |
isDefault() |
boolean |
isExternal() |
String |
toString() |
getBlob, getCode, getCodeSize, getSize
getAddress, getName, getVersion, isValid, setAddress
private final HotSpotResolvedJavaMethod method
private final boolean isDefault
private final boolean isExternal
public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault)
public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault, boolean isExternal)
public boolean isDefault()
public boolean isExternal()
public ResolvedJavaMethod getMethod()
public void invalidate()
invalidate
in class InstalledCode
public String toString()
toString
in class HotSpotInstalledCode
protected boolean checkThreeObjectArgs()
public Object executeVarargs(Object... args) throws InvalidInstalledCodeException
executeVarargs
in class InstalledCode
InvalidInstalledCodeException
public long getStart()
getStart
in class HotSpotInstalledCode