本文整理汇总了Java中sun.jvm.hotspot.types.TypeDataBase类的典型用法代码示例。如果您正苦于以下问题:Java TypeDataBase类的具体用法?Java TypeDataBase怎么用?Java TypeDataBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeDataBase类属于sun.jvm.hotspot.types包,在下文中一共展示了TypeDataBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("Method");
constMethod = type.getAddressField("_constMethod");
methodData = type.getAddressField("_method_data");
methodCounters = type.getAddressField("_method_counters");
methodSize = new CIntField(type.getCIntegerField("_method_size"), 0);
accessFlags = new CIntField(type.getCIntegerField("_access_flags"), 0);
code = type.getAddressField("_code");
vtableIndex = new CIntField(type.getCIntegerField("_vtable_index"), 0);
bytecodeOffset = type.getSize();
/*
interpreterEntry = type.getAddressField("_interpreter_entry");
fromCompiledCodeEntryPoint = type.getAddressField("_from_compiled_code_entry_point");
*/
objectInitializerName = null;
classInitializerName = null;
}
示例2: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
type = db.lookupType("Method");
constMethod = type.getAddressField("_constMethod");
methodData = type.getAddressField("_method_data");
methodCounters = type.getAddressField("_method_counters");
accessFlags = new CIntField(type.getCIntegerField("_access_flags"), 0);
code = type.getAddressField("_code");
vtableIndex = new CIntField(type.getCIntegerField("_vtable_index"), 0);
/*
fromCompiledCodeEntryPoint = type.getAddressField("_from_compiled_code_entry_point");
interpreterEntry = type.getAddressField("_from_interpreted_entry");
*/
objectInitializerName = null;
classInitializerName = null;
}
示例3: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static void initialize(TypeDataBase db) {
Type type = db.lookupType("CodeBlob");
nameField = type.getAddressField("_name");
sizeField = type.getCIntegerField("_size");
headerSizeField = type.getCIntegerField("_header_size");
frameCompleteOffsetField = type.getCIntegerField("_frame_complete_offset");
contentBeginField = type.getAddressField("_content_begin");
codeBeginField = type.getAddressField("_code_begin");
codeEndField = type.getAddressField("_code_end");
dataEndField = type.getAddressField("_data_end");
dataOffsetField = type.getCIntegerField("_data_offset");
frameSizeField = type.getCIntegerField("_frame_size");
oopMapsField = type.getAddressField("_oop_maps");
if (VM.getVM().isServerCompiler()) {
matcherInterpreterFramePointerReg =
db.lookupIntConstant("Matcher::interpreter_frame_pointer_reg").intValue();
}
}
示例4: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("ciInstanceKlass");
initStateField = new CIntField(type.getCIntegerField("_init_state"), 0);
isSharedField = new CIntField(type.getCIntegerField("_is_shared"), 0);
CLASS_STATE_LINKED = db.lookupIntConstant("InstanceKlass::linked").intValue();
CLASS_STATE_FULLY_INITIALIZED = db.lookupIntConstant("InstanceKlass::fully_initialized").intValue();
}
示例5: initThreadFields
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static void initThreadFields() {
if (threadNameField == null) {
SystemDictionary sysDict = VM.getVM().getSystemDictionary();
InstanceKlass k = sysDict.getThreadKlass();
threadNameField = (OopField) k.findField("name", "[C");
threadGroupField = (OopField) k.findField("group", "Ljava/lang/ThreadGroup;");
threadEETopField = (LongField) k.findField("eetop", "J");
threadStatusField = (IntField) k.findField("threadStatus", "I");
threadParkBlockerField = (OopField) k.findField("parkBlocker",
"Ljava/lang/Object;");
TypeDataBase db = VM.getVM().getTypeDataBase();
THREAD_STATUS_NEW = db.lookupIntConstant("java_lang_Thread::NEW").intValue();
/*
Other enum constants are not needed as of now. Uncomment these as and when needed.
THREAD_STATUS_RUNNABLE = db.lookupIntConstant("java_lang_Thread::RUNNABLE").intValue();
THREAD_STATUS_SLEEPING = db.lookupIntConstant("java_lang_Thread::SLEEPING").intValue();
THREAD_STATUS_IN_OBJECT_WAIT = db.lookupIntConstant("java_lang_Thread::IN_OBJECT_WAIT").intValue();
THREAD_STATUS_IN_OBJECT_WAIT_TIMED = db.lookupIntConstant("java_lang_Thread::IN_OBJECT_WAIT_TIMED").intValue();
THREAD_STATUS_PARKED = db.lookupIntConstant("java_lang_Thread::PARKED").intValue();
THREAD_STATUS_PARKED_TIMED = db.lookupIntConstant("java_lang_Thread::PARKED_TIMED").intValue();
THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER = db.lookupIntConstant("java_lang_Thread::BLOCKED_ON_MONITOR_ENTER").intValue();
THREAD_STATUS_TERMINATED = db.lookupIntConstant("java_lang_Thread::TERMINATED").intValue();
*/
if (Assert.ASSERTS_ENABLED) {
// it is okay to miss threadStatusField, because this was
// introduced only in 1.5 JDK.
Assert.that(threadNameField != null &&
threadGroupField != null &&
threadEETopField != null, "must find all java.lang.Thread fields");
}
}
}
示例6: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static synchronized void initialize(TypeDataBase db) {
// klass and oop_size are HotSpot magic fields and hence we can't
// find them from InstanceKlass for java.lang.Class.
Type jlc = db.lookupType("java_lang_Class");
klassOffset = (int) jlc.getCIntegerField("_klass_offset").getValue();
int oopSizeOffset = (int) jlc.getCIntegerField("_oop_size_offset").getValue();
oopSizeField = new IntField(new NamedFieldIdentifier("oop_size"), oopSizeOffset, true);
}
示例7: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
static private synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1MonitoringSupport");
edenCommittedField = type.getCIntegerField("_eden_committed");
edenUsedField = type.getCIntegerField("_eden_used");
survivorCommittedField = type.getCIntegerField("_survivor_committed");
survivorUsedField = type.getCIntegerField("_survivor_used");
oldCommittedField = type.getCIntegerField("_old_committed");
oldUsedField = type.getCIntegerField("_old_used");
}
示例8: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
static private synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1CollectedHeap");
hrsFieldOffset = type.getField("_hrs").getOffset();
g1CommittedFieldOffset = type.getField("_g1_committed").getOffset();
summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
g1mmField = type.getAddressField("_g1mm");
oldSetFieldOffset = type.getField("_old_set").getOffset();
humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
}
示例9: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
static private synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("HeapRegionSetBase");
lengthField = type.getCIntegerField("_length");
regionNumField = type.getCIntegerField("_region_num");
totalUsedBytesField = type.getCIntegerField("_total_used_bytes");
}
示例10: initThreadFields
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static void initThreadFields() {
if (threadNameField == null) {
SystemDictionary sysDict = VM.getVM().getSystemDictionary();
InstanceKlass k = sysDict.getThreadKlass();
threadNameField = (OopField) k.findField("name", "Ljava/lang/String;");
threadGroupField = (OopField) k.findField("group", "Ljava/lang/ThreadGroup;");
threadEETopField = (LongField) k.findField("eetop", "J");
threadTIDField = (LongField) k.findField("tid", "J");
threadStatusField = (IntField) k.findField("threadStatus", "I");
threadParkBlockerField = (OopField) k.findField("parkBlocker",
"Ljava/lang/Object;");
threadPriorityField = (IntField) k.findField("priority", "I");
threadDaemonField = (BooleanField) k.findField("daemon", "Z");
TypeDataBase db = VM.getVM().getTypeDataBase();
THREAD_STATUS_NEW = db.lookupIntConstant("java_lang_Thread::NEW").intValue();
THREAD_STATUS_RUNNABLE = db.lookupIntConstant("java_lang_Thread::RUNNABLE").intValue();
THREAD_STATUS_SLEEPING = db.lookupIntConstant("java_lang_Thread::SLEEPING").intValue();
THREAD_STATUS_IN_OBJECT_WAIT = db.lookupIntConstant("java_lang_Thread::IN_OBJECT_WAIT").intValue();
THREAD_STATUS_IN_OBJECT_WAIT_TIMED = db.lookupIntConstant("java_lang_Thread::IN_OBJECT_WAIT_TIMED").intValue();
THREAD_STATUS_PARKED = db.lookupIntConstant("java_lang_Thread::PARKED").intValue();
THREAD_STATUS_PARKED_TIMED = db.lookupIntConstant("java_lang_Thread::PARKED_TIMED").intValue();
THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER = db.lookupIntConstant("java_lang_Thread::BLOCKED_ON_MONITOR_ENTER").intValue();
THREAD_STATUS_TERMINATED = db.lookupIntConstant("java_lang_Thread::TERMINATED").intValue();
if (Assert.ASSERTS_ENABLED) {
// it is okay to miss threadStatusField, because this was
// introduced only in 1.5 JDK.
Assert.that(threadNameField != null &&
threadGroupField != null &&
threadEETopField != null, "must find all java.lang.Thread fields");
}
}
}
示例11: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
static private synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1CollectedHeap");
hrmFieldOffset = type.getField("_hrm").getOffset();
summaryBytesUsedField = type.getCIntegerField("_summary_bytes_used");
g1mmField = type.getAddressField("_g1mm");
oldSetFieldOffset = type.getField("_old_set").getOffset();
humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
}
示例12: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
static private synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1HeapRegionTable");
baseField = type.getAddressField("_base");
lengthField = type.getCIntegerField("_length");
biasedBaseField = type.getAddressField("_biased_base");
biasField = type.getCIntegerField("_bias");
shiftByField = type.getCIntegerField("_shift_by");
}
示例13: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static void initialize(TypeDataBase db) {
Type type = db.lookupType("ImmutableOopMapPair");
pcField = type.getCIntegerField("_pc_offset");
offsetField = type.getCIntegerField("_oopmap_offset");
classSize = type.getSize();
}
示例14: initThreadFields
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static void initThreadFields() {
if (threadNameField == null) {
SystemDictionary sysDict = VM.getVM().getSystemDictionary();
InstanceKlass k = sysDict.getThreadKlass();
threadNameField = (OopField) k.findField("name", "Ljava/lang/String;");
threadGroupField = (OopField) k.findField("group", "Ljava/lang/ThreadGroup;");
threadEETopField = (LongField) k.findField("eetop", "J");
threadTIDField = (LongField) k.findField("tid", "J");
threadStatusField = (IntField) k.findField("threadStatus", "I");
threadParkBlockerField = (OopField) k.findField("parkBlocker",
"Ljava/lang/Object;");
TypeDataBase db = VM.getVM().getTypeDataBase();
THREAD_STATUS_NEW = db.lookupIntConstant("java_lang_Thread::NEW").intValue();
/*
Other enum constants are not needed as of now. Uncomment these as and when needed.
THREAD_STATUS_RUNNABLE = db.lookupIntConstant("java_lang_Thread::RUNNABLE").intValue();
THREAD_STATUS_SLEEPING = db.lookupIntConstant("java_lang_Thread::SLEEPING").intValue();
THREAD_STATUS_IN_OBJECT_WAIT = db.lookupIntConstant("java_lang_Thread::IN_OBJECT_WAIT").intValue();
THREAD_STATUS_IN_OBJECT_WAIT_TIMED = db.lookupIntConstant("java_lang_Thread::IN_OBJECT_WAIT_TIMED").intValue();
THREAD_STATUS_PARKED = db.lookupIntConstant("java_lang_Thread::PARKED").intValue();
THREAD_STATUS_PARKED_TIMED = db.lookupIntConstant("java_lang_Thread::PARKED_TIMED").intValue();
THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER = db.lookupIntConstant("java_lang_Thread::BLOCKED_ON_MONITOR_ENTER").intValue();
THREAD_STATUS_TERMINATED = db.lookupIntConstant("java_lang_Thread::TERMINATED").intValue();
*/
if (Assert.ASSERTS_ENABLED) {
// it is okay to miss threadStatusField, because this was
// introduced only in 1.5 JDK.
Assert.that(threadNameField != null &&
threadGroupField != null &&
threadEETopField != null, "must find all java.lang.Thread fields");
}
}
}
示例15: FastObjectHeap
import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
public FastObjectHeap(TypeDataBase db, SymbolTable symTbl) {
super(db);
Type klassType = db.lookupType("Klass");
klassLayoutHelper = new IntField(klassType.getJIntField("_layout_helper"), 0L);
klassName = klassType.getAddressField("_name");
Type objArrayKlassType = db.lookupType("ObjArrayKlass");
objArrayBottomKlass = objArrayKlassType.getAddressField("_bottom_klass");
Type oopType = db.lookupType("oopDesc");
oopKlass = new MetadataField(oopType.getAddressField("_metadata._klass"), 0L);
oopCompressedKlass = new NarrowKlassField(oopType.getAddressField("_metadata._compressed_klass"), 0L);
Type jlc = db.lookupType("java_lang_Class");
oopKlassOffset = jlc.getCIntegerField("_klass_offset").getValue();
oopArrayKlassOffset = jlc.getCIntegerField("_array_klass_offset").getValue();
javaLangClass = symTbl.probe("java/lang/Class");
try {
Field f = db.getClass().getSuperclass().getDeclaredField("vtblAccess");
f.setAccessible(true);
vtblAccess = (VtblAccess) f.get(db);
klassVtbls = new HashSet<Address>();
for (String type : KLASS_TYPES) {
Address a = vtblAccess.getVtblForType(db.lookupType(type));
if (a == null) {
throw new IllegalStateException();
}
klassVtbls.add(a);
}
instanceMirrorKlassVtbl = vtblAccess.getVtblForType(db.lookupType("InstanceMirrorKlass"));
} catch (Exception e) {
throw new RuntimeException(e);
}
}