This is the cross-platform TypeDataBase used by the Oop hierarchy. The decision was made to make this cross-platform by having the VM export the necessary symbols via a built-in table; see src/share/vm/runtime/vmStructs.[ch]pp for more details.
Warning
clients should refer to this class through the TypeDataBase interface and not directly to the HotSpotTypeDataBase type.
Note
since we are fetching the sizes of the Java primitive types
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final boolean | |
| private int | |
| private String[] | |
| private static final int | |
| private static int | |
| private Debugger | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | HotSpotTypeDataBase(MachineDescription machDesc, VtblAccess vtblAccess, Debugger symbolLookup, String[] jvmLibNames)
This requires a SymbolLookup mechanism as well as the MachineDescription. |
| Modifier and Type | Method and Description |
|---|---|
| private BasicType | createBasicType(String typeName, boolean isOopType, boolean isIntegerType, boolean isUnsigned)
Creates a new BasicType, initializes its size to -1 so we can test to ensure that all types' sizes are initialized by VMTypes, and adds it to the database. |
| public void | createField(BasicType containingType, String name, Type type, boolean isStatic, long offset, Address staticFieldAddress)
"Virtual constructor" for fields based on type |
| public void | createType(String typeName, String superclassName, boolean isOopType, boolean isIntegerType, boolean isUnsigned, long size)
|
| private void | |
| private long | |
| private void | |
| pack-priv Field | internalCreateField(BasicType containingType, String name, Type type, boolean isStatic, long offset, Address staticFieldAddress)
|
| private Address | |
| private BasicType | |
| private BasicType | |
| private Type | |
| public Type | lookupType(String cTypeName, boolean throwException)
Overrides sun. Implements sun. For simplicity of the initial implementation, this is not guaranteed to work for primitive types. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private BasicPointerType | recursiveCreateBasicPointerType(String typeName)
Recursively creates a PointerType from the string representation of the type's name. |
| private boolean |
| C_INT32_SIZE | back to summary |
|---|---|
| private static final int C_INT32_SIZE | |
| C_INT64_SIZE | back to summary |
|---|---|
| private static final int C_INT64_SIZE | |
| C_INT8_SIZE | back to summary |
|---|---|
| private static final int C_INT8_SIZE | |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG | |
| duplicateDefCount | back to summary |
|---|---|
| private int duplicateDefCount | |
| jvmLibNames | back to summary |
|---|---|
| private String[] jvmLibNames | |
| MAX_DUPLICATE_DEFINITIONS | back to summary |
|---|---|
| private static final int MAX_DUPLICATE_DEFINITIONS | |
| pointerSize | back to summary |
|---|---|
| private static int pointerSize | |
| symbolLookup | back to summary |
|---|---|
| private Debugger symbolLookup | |
| UNINITIALIZED_SIZE | back to summary |
|---|---|
| private static final int UNINITIALIZED_SIZE | |
| HotSpotTypeDataBase | back to summary |
|---|---|
| public HotSpotTypeDataBase(MachineDescription machDesc, VtblAccess vtblAccess, Debugger symbolLookup, String[] jvmLibNames) throws NoSuchSymbolException This requires a SymbolLookup mechanism as well as the MachineDescription. Note that we do not need a NameMangler since we use the vmStructs mechanism to avoid looking up C++ symbols. NOTE that it is guaranteed that this constructor will not attempt to fetch any Java values from the remote process, only C integers and addresses. This is required because we are fetching the sizes of the Java primitive types from the remote process, implying that attempting to fetch them before their sizes are known is illegal. Throws NoSuchSymbolException if a problem occurred while looking up one of the bootstrapping symbols related to the VMStructs table in the remote VM; this may indicate that the remote process is not actually a HotSpot VM. | |
| createBasicType | back to summary |
|---|---|
| private BasicType createBasicType(String typeName, boolean isOopType, boolean isIntegerType, boolean isUnsigned) Creates a new BasicType, initializes its size to -1 so we can test to ensure that all types' sizes are initialized by VMTypes, and adds it to the database. Takes care of initializing integer and oop types properly. | |
| createField | back to summary |
|---|---|
| public void createField(BasicType containingType, String name, Type type, boolean isStatic, long offset, Address staticFieldAddress) "Virtual constructor" for fields based on type | |
| createType | back to summary |
|---|---|
| public void createType(String typeName, String superclassName, boolean isOopType, boolean isIntegerType, boolean isUnsigned, long size) | |
| dumpMemory | back to summary |
|---|---|
| private void dumpMemory(Address addr, int len) | |
| getLongValueFromProcess | back to summary |
|---|---|
| private long getLongValueFromProcess(String symbol) | |
| initializePrimitiveTypes | back to summary |
|---|---|
| private void initializePrimitiveTypes() | |
| internalCreateField | back to summary |
|---|---|
| pack-priv Field internalCreateField(BasicType containingType, String name, Type type, boolean isStatic, long offset, Address staticFieldAddress) | |
| lookupInProcess | back to summary |
|---|---|
| private Address lookupInProcess(String symbol) throws NoSuchSymbolException | |
| lookupOrCreateClass | back to summary |
|---|---|
| private BasicType lookupOrCreateClass(String typeName, boolean isOopType, boolean isIntegerType, boolean isUnsigned) | |
| lookupOrFail | back to summary |
|---|---|
| private BasicType lookupOrFail(String typeName) | |
| lookupPrimitiveType | back to summary |
|---|---|
| private Type lookupPrimitiveType(String typeName) | |
| lookupType | back to summary |
|---|---|
| public Type lookupType(String cTypeName, boolean throwException) Overrides sun. Implements sun. Doc from sun. For simplicity of the initial implementation, this is not guaranteed to work for primitive types. If throwException is true, throws an (unspecified) run-time exception if the type is not found. | |
| readExternalDefinitions | back to summary |
|---|---|
| private void readExternalDefinitions() | |
| readVMIntConstants | back to summary |
|---|---|
| private void readVMIntConstants() | |
| readVMLongConstants | back to summary |
|---|---|
| private void readVMLongConstants() | |
| readVMStructs | back to summary |
|---|---|
| private void readVMStructs() | |
| readVMTypes | back to summary |
|---|---|
| private void readVMTypes() | |
| recursiveCreateBasicPointerType | back to summary |
|---|---|
| private BasicPointerType recursiveCreateBasicPointerType(String typeName) Recursively creates a PointerType from the string representation of the type's name. Note that this currently needs some workarounds due to incomplete information in the VMStructs database. | |
| typeNameIsPointerType | back to summary |
|---|---|
| private boolean typeNameIsPointerType(String typeName) | |