本文整理汇总了Java中sun.jvm.hotspot.types.TypeDataBase.lookupType方法的典型用法代码示例。如果您正苦于以下问题:Java TypeDataBase.lookupType方法的具体用法?Java TypeDataBase.lookupType怎么用?Java TypeDataBase.lookupType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.jvm.hotspot.types.TypeDataBase
的用法示例。
在下文中一共展示了TypeDataBase.lookupType方法的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 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();
}
}
示例3: 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();
}
示例4: 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);
}
示例5: 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");
}
示例6: 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");
}
示例7: 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();
}
示例8: 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);
}
}
示例9: 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();
g1Allocator = type.getAddressField("_allocator");
g1mmField = type.getAddressField("_g1mm");
oldSetFieldOffset = type.getField("_old_set").getOffset();
humongousSetFieldOffset = type.getField("_humongous_set").getOffset();
}
示例10: 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");
int klassOffset = (int) jlc.getCIntegerField("klass_offset").getValue();
if (VM.getVM().isCompressedOopsEnabled()) {
klassField = new NarrowOopField(new NamedFieldIdentifier("klass"), klassOffset, true);
} else {
klassField = new OopField(new NamedFieldIdentifier("klass"), klassOffset, true);
}
int oopSizeOffset = (int) jlc.getCIntegerField("oop_size_offset").getValue();
oopSizeField = new IntField(new NamedFieldIdentifier("oop_size"), oopSizeOffset, true);
}
示例11: 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();
}
示例12: 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");
}
示例13: 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");
int klassOffset = (int) jlc.getCIntegerField("_klass_offset").getValue();
if (VM.getVM().isCompressedOopsEnabled()) {
klassField = new NarrowOopField(new NamedFieldIdentifier("klass"), klassOffset, true);
} else {
klassField = new OopField(new NamedFieldIdentifier("klass"), klassOffset, true);
}
int oopSizeOffset = (int) jlc.getCIntegerField("_oop_size_offset").getValue();
oopSizeField = new IntField(new NamedFieldIdentifier("oop_size"), oopSizeOffset, true);
}
示例14: 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();
}
示例15: initialize
import sun.jvm.hotspot.types.TypeDataBase; //导入方法依赖的package包/类
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
// Array<int> is arbitrarily chosen to get the fields in Array<T>.
Type type = db.lookupType("Array<int>");
lengthField = new CIntField(type.getCIntegerField("_length"), 0);
}