本文整理汇总了Java中sun.jvm.hotspot.memory.SymbolTable.probe方法的典型用法代码示例。如果您正苦于以下问题:Java SymbolTable.probe方法的具体用法?Java SymbolTable.probe怎么用?Java SymbolTable.probe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.jvm.hotspot.memory.SymbolTable
的用法示例。
在下文中一共展示了SymbolTable.probe方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initClassNameSymbols
import sun.jvm.hotspot.memory.SymbolTable; //导入方法依赖的package包/类
private void initClassNameSymbols() {
SymbolTable st = saSymbolTable();
javaLangString = st.probe("java/lang/String");
javaLangThread = st.probe("java/lang/Thread");
javaLangThreadGroup = st.probe("java/lang/ThreadGroup");
javaLangClass = st.probe("java/lang/Class");
javaLangClassLoader = st.probe("java/lang/ClassLoader");
javaLangThrowable = st.probe("java/lang/Throwable");
javaLangObject = st.probe("java/lang/Object");
javaLangCloneable = st.probe("java/lang/Cloneable");
javaIoSerializable = st.probe("java/io/Serializable");
javaLangEnum = st.probe("java/lang/Enum");
}
示例2: FastObjectHeap
import sun.jvm.hotspot.memory.SymbolTable; //导入方法依赖的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);
}
}