APIdia Launch Partner
Top Fields Constructors Methods
sun.jvm.hotspot.code

public Class NMethod

extends CodeBlob
Class Inheritance
Imports
java.io.*, java.util.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.memory.*, sun.jvm.hotspot.oops.*, sun.jvm.hotspot.runtime.*, sun.jvm.hotspot.types.*, sun.jvm.hotspot.utilities.*, .Observable, .Observer

Field Summary

Modifier and TypeField and Description
private static CIntField
private static CIntegerField
private static CIntegerField
entryBCIField

!= InvocationEntryBci if this nmethod is an on-stack replacement method

private static CIntField
entryOffsetField

Entry point with class check

private static CIntegerField
exceptionOffsetField

Offsets for different nmethod parts

private static CIntField
private static AddressField
private static CIntegerField
private static long
private static CIntegerField
private static AddressField
private static CIntField
private static CIntegerField
private static AddressField
osrEntryPointField

Entry point for on stack replacement

private static AddressField
osrLinkField

To support simple linked-list chaining of nmethods

private static long
private static CIntegerField
private static CIntegerField
private static CIntegerField
private static CIntField
verifiedEntryOffsetField

Entry point without class check

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
canBeDeoptimized()

Tells whether frames described by this nmethod can be deoptimized.

public Address
constantsBegin()

Boundaries for different parts

public boolean
public Address
public int
public void
decodeAllScopeDescs()

Attempt to decode all the debug info in this nmethod.

public Address
public Address
public Address
public int
public Address
pack-priv PCDesc
find_pc_desc(long pc, boolean approximate)

pack-priv PCDesc
find_pc_desc_internal(long pc, boolean approximate)

public String
public Address
private int
private int
private int
public static int
public Address
getEntryPoint()

Entry points

public int
getEntryPointOffset()

Support for code generation.

private int
private int
private int
public int
public Address
getMetadataAt(int index)

Support for metadata in scopes and relocs.

public int
public Method
public Method
getMethodAt(int index)

public static int
public String
private int
public OopHandle
getOopAt(int index)

Support for oops in scopes and relocs.

public int
public int
getOSREntryBCI()

On-stack replacement support

public static int
public PCDesc
getPCDescAt(Address pc)

Finds a PCDesc with real-pc equal to "pc"

public PCDesc
getPCDescNearDbg(Address pc)

This is only for use by the debugging system, and is only intended for use in the topmost frame, where we are not guaranteed to be at a PC for which we have a PCDesc.

public Map<Address, PCDesc>
public ScopeDesc
getScopeDescAt(Address pc)

ScopeDesc for an instruction

public ScopeDesc
getScopeDescNearDbg(Address pc)

This is only for use by the debugging system, and is only intended for use in the topmost frame, where we are not guaranteed to be at a PC for which we have a PCDesc.

private int
private int
private int
public Address
public int
public Address
public boolean
public Address
public int
public Address
public Address
public Address
public int
private static void
public Address
public boolean
public Address
public int
public boolean
public boolean
public boolean
public boolean
public boolean
pack-priv static boolean
match_desc(PCDesc pc, int pc_offset, boolean approximate)

public Address
public boolean
public Address
public int
public Address
public boolean
public Address
public int
public Address
public boolean
public Address
public int
public int
pack-priv PCDesc
pc_desc_at(long pc)

pack-priv PCDesc
pc_desc_near(long pc)

protected void
public ScopeDesc
scope_desc_in(long begin, long end)

public Address
public boolean
public Address
public int
public Address
public boolean
public Address
public int
public Address
public boolean
public Address
public int
public String
toString()

Overrides sun.jvm.hotspot.runtime.VMObject.toString.

Returns a string representation of the object.

public int
Inherited from sun.jvm.hotspot.code.CodeBlob:
asNMethodOrNullblobContainscallerMustGCArgumentscodeBegincodeContainscodeEndcontainscontentBegincontentContainscontentEnddataBegindataContainsdataEndgetClassForgetCodeOffsetgetCodeSizegetContentOffsetgetContentSizegetDataOffsetgetDataSizegetFrameCompleteOffsetgetFrameSizegetFrameSizeWordsgetHeaderSizegetKindgetMutableDataSizegetOopMapForReturnAddressgetOopMapsgetRelocationSizegetSizeheaderBeginheaderEndisContinuationStubisFrameCompleteAtisNMethodisRuntimeStubisUpcallStubmutableDataBeginmutableDataEndprintOn

Field Detail

compLevelFieldback to summary
private static CIntField compLevelField
deoptHandlerEntryOffsetFieldback to summary
private static CIntegerField deoptHandlerEntryOffsetField
entryBCIFieldback to summary
private static CIntegerField entryBCIField

!= InvocationEntryBci if this nmethod is an on-stack replacement method

entryOffsetFieldback to summary
private static CIntField entryOffsetField

Entry point with class check

exceptionOffsetFieldback to summary
private static CIntegerField exceptionOffsetField

Offsets for different nmethod parts

handlerTableOffsetFieldback to summary
private static CIntField handlerTableOffsetField
immutableDataFieldback to summary
private static AddressField immutableDataField
immutableDataRefCountOffsetFieldback to summary
private static CIntegerField immutableDataRefCountOffsetField
immutableDataRefCountSizeback to summary
private static long immutableDataRefCountSize
immutableDataSizeFieldback to summary
private static CIntegerField immutableDataSizeField
methodFieldback to summary
private static AddressField methodField
nulChkTableOffsetFieldback to summary
private static CIntField nulChkTableOffsetField
origPCOffsetFieldback to summary
private static CIntegerField origPCOffsetField
osrEntryPointFieldback to summary
private static AddressField osrEntryPointField

Entry point for on stack replacement

osrLinkFieldback to summary
private static AddressField osrLinkField

To support simple linked-list chaining of nmethods

pcDescSizeback to summary
private static long pcDescSize
scopesDataOffsetFieldback to summary
private static CIntegerField scopesDataOffsetField
scopesPCsOffsetFieldback to summary
private static CIntegerField scopesPCsOffsetField
stubOffsetFieldback to summary
private static CIntegerField stubOffsetField
verifiedEntryOffsetFieldback to summary
private static CIntField verifiedEntryOffsetField

Entry point without class check

Constructor Detail

NMethodback to summary
public NMethod(Address addr)

Method Detail

canBeDeoptimizedback to summary
public boolean canBeDeoptimized()

Tells whether frames described by this nmethod can be deoptimized.

Note

native wrappers cannot be deoptimized.

constantsBeginback to summary
public Address constantsBegin()

Boundaries for different parts

constantsContainsback to summary
public boolean constantsContains(Address addr)
constantsEndback to summary
public Address constantsEnd()
constantsSizeback to summary
public int constantsSize()
decodeAllScopeDescsback to summary
public void decodeAllScopeDescs()

Attempt to decode all the debug info in this nmethod. This is intended purely for testing.

deoptHandlerEntryback to summary
public Address deoptHandlerEntry()
dependenciesBeginback to summary
public Address dependenciesBegin()
dependenciesEndback to summary
public Address dependenciesEnd()
dependenciesSizeback to summary
public int dependenciesSize()
exceptionBeginback to summary
public Address exceptionBegin()
find_pc_descback to summary
pack-priv PCDesc find_pc_desc(long pc, boolean approximate)
find_pc_desc_internalback to summary
pack-priv PCDesc find_pc_desc_internal(long pc, boolean approximate)
flagsToStringback to summary
public String flagsToString()
getAddressback to summary
public Address getAddress()

Overrides sun.jvm.hotspot.runtime.VMObject.getAddress.

getCompLevelback to summary
private int getCompLevel()
getDeoptHandlerEntryOffsetback to summary
private int getDeoptHandlerEntryOffset()
getEntryBCIback to summary
private int getEntryBCI()
getEntryBCIOffsetback to summary
public static int getEntryBCIOffset()
getEntryPointback to summary
public Address getEntryPoint()

Entry points

getEntryPointOffsetback to summary
public int getEntryPointOffset()

Support for code generation. Only here for proof-of-concept.

getExceptionOffsetback to summary
private int getExceptionOffset()
getHandlerTableOffsetback to summary
private int getHandlerTableOffset()
getImmutableDataRefCountOffsetback to summary
private int getImmutableDataRefCountOffset()
getImmutableDataSizeback to summary
public int getImmutableDataSize()
getMetadataAtback to summary
public Address getMetadataAt(int index)

Support for metadata in scopes and relocs.

Note

index 0 is reserved for null.

getMetadataLengthback to summary
public int getMetadataLength()
getMethodback to summary
public Method getMethod()
getMethodAtback to summary
public Method getMethodAt(int index)
getMethodOffsetback to summary
public static int getMethodOffset()
getNameback to summary
public String getName()

Overrides sun.jvm.hotspot.code.CodeBlob.getName.

getNulChkTableOffsetback to summary
private int getNulChkTableOffset()
getOopAtback to summary
public OopHandle getOopAt(int index)

Support for oops in scopes and relocs.

Note

index 0 is reserved for null.

getOopsLengthback to summary
public int getOopsLength()
getOSREntryBCIback to summary
public int getOSREntryBCI()

On-stack replacement support

getOSREntryPointOffsetback to summary
public static int getOSREntryPointOffset()
getPCDescAtback to summary
public PCDesc getPCDescAt(Address pc)

Finds a PCDesc with real-pc equal to "pc"

getPCDescNearDbgback to summary
public PCDesc getPCDescNearDbg(Address pc)

This is only for use by the debugging system, and is only intended for use in the topmost frame, where we are not guaranteed to be at a PC for which we have a PCDesc. It finds the PCDesc with realPC closest to the current PC that has a valid scope decode offset.

getSafepointsback to summary
public Map<Address, PCDesc> getSafepoints()
getScopeDescAtback to summary
public ScopeDesc getScopeDescAt(Address pc)

ScopeDesc for an instruction

getScopeDescNearDbgback to summary
public ScopeDesc getScopeDescNearDbg(Address pc)

This is only for use by the debugging system, and is only intended for use in the topmost frame, where we are not guaranteed to be at a PC for which we have a PCDesc. It finds the ScopeDesc closest to the current PC. NOTE that this may return NULL for compiled methods which don't have any ScopeDescs!

getScopesDataOffsetback to summary
private int getScopesDataOffset()
getScopesPCsOffsetback to summary
private int getScopesPCsOffset()
getStubOffsetback to summary
private int getStubOffset()
getVerifiedEntryPointback to summary
public Address getVerifiedEntryPoint()
getVerifiedEntryPointOffsetback to summary
public int getVerifiedEntryPointOffset()
handlerTableBeginback to summary
public Address handlerTableBegin()
handlerTableContainsback to summary
public boolean handlerTableContains(Address addr)
handlerTableEndback to summary
public Address handlerTableEnd()
handlerTableSizeback to summary
public int handlerTableSize()
immutableDataBeginback to summary
public Address immutableDataBegin()
immutableDataEndback to summary
public Address immutableDataEnd()
immutableDataRefCountBeginback to summary
public Address immutableDataRefCountBegin()
immutableDataSizeback to summary
public int immutableDataSize()
initializeback to summary
private static void initialize(TypeDataBase db)

Hides sun.jvm.hotspot.code.CodeBlob.initialize.

instsBeginback to summary
public Address instsBegin()
instsContainsback to summary
public boolean instsContains(Address addr)
instsEndback to summary
public Address instsEnd()
instsSizeback to summary
public int instsSize()
isDeoptEntryback to summary
public boolean isDeoptEntry(Address pc)
isDeoptPcback to summary
public boolean isDeoptPc(Address pc)
isJavaMethodback to summary
public boolean isJavaMethod()

Overrides sun.jvm.hotspot.code.CodeBlob.isJavaMethod.

isNativeMethodback to summary
public boolean isNativeMethod()

Overrides sun.jvm.hotspot.code.CodeBlob.isNativeMethod.

isOSRMethodback to summary
public boolean isOSRMethod()
match_descback to summary
pack-priv static boolean match_desc(PCDesc pc, int pc_offset, boolean approximate)
metadataBeginback to summary
public Address metadataBegin()
metadataContainsback to summary
public boolean metadataContains(Address addr)
metadataEndback to summary
public Address metadataEnd()
metadataSizeback to summary
public int metadataSize()
nulChkTableBeginback to summary
public Address nulChkTableBegin()
nulChkTableContainsback to summary
public boolean nulChkTableContains(Address addr)
nulChkTableEndback to summary
public Address nulChkTableEnd()
nulChkTableSizeback to summary
public int nulChkTableSize()
oopsBeginback to summary
public Address oopsBegin()
oopsContainsback to summary
public boolean oopsContains(Address addr)
oopsEndback to summary
public Address oopsEnd()
oopsSizeback to summary
public int oopsSize()
origPCOffsetback to summary
public int origPCOffset()
pc_desc_atback to summary
pack-priv PCDesc pc_desc_at(long pc)
pc_desc_nearback to summary
pack-priv PCDesc pc_desc_near(long pc)
printComponentsOnback to summary
protected void printComponentsOn(PrintStream tty)

Overrides sun.jvm.hotspot.code.CodeBlob.printComponentsOn.

scope_desc_inback to summary
public ScopeDesc scope_desc_in(long begin, long end)
scopesDataBeginback to summary
public Address scopesDataBegin()
scopesDataContainsback to summary
public boolean scopesDataContains(Address addr)
scopesDataEndback to summary
public Address scopesDataEnd()
scopesDataSizeback to summary
public int scopesDataSize()
scopesPCsBeginback to summary
public Address scopesPCsBegin()
scopesPCsContainsback to summary
public boolean scopesPCsContains(Address addr)
scopesPCsEndback to summary
public Address scopesPCsEnd()
scopesPCsSizeback to summary
public int scopesPCsSize()
stubBeginback to summary
public Address stubBegin()
stubContainsback to summary
public boolean stubContains(Address addr)
stubEndback to summary
public Address stubEnd()
stubSizeback to summary
public int stubSize()
toStringback to summary
public String toString()

Overrides sun.jvm.hotspot.runtime.VMObject.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

totalSizeback to summary
public int totalSize()