• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TypeDataBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中sun.jvm.hotspot.types.TypeDataBase的典型用法代码示例。如果您正苦于以下问题:Java TypeDataBase类的具体用法?Java TypeDataBase怎么用?Java TypeDataBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TypeDataBase类属于sun.jvm.hotspot.types包,在下文中一共展示了TypeDataBase类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:20,代码来源:Method.java


示例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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:Method.java


示例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();
  }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:CodeBlob.java


示例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();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:ciInstanceKlass.java


示例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");
    }
  }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:35,代码来源:OopUtilities.java


示例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);
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:9,代码来源:java_lang_Class.java


示例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");
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:11,代码来源:G1MonitoringSupport.java


示例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();
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:11,代码来源:G1CollectedHeap.java


示例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");
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:8,代码来源:HeapRegionSetBase.java


示例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");
    }
  }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:35,代码来源:OopUtilities.java


示例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();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:G1CollectedHeap.java


示例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");
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:G1HeapRegionTable.java


示例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();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:ImmutableOopMapPair.java


示例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");
    }
  }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:36,代码来源:OopUtilities.java


示例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);
  }
}
 
开发者ID:geoff-addepar,项目名称:heap-dump,代码行数:38,代码来源:FastObjectHeap.java


示例16: initialize

import sun.jvm.hotspot.types.TypeDataBase; //导入依赖的package包/类
private static synchronized void initialize(TypeDataBase db) {
   long sizeofFreeChunk = db.lookupType("FreeChunk").getSize();
   VM vm = VM.getVM();
   MinChunkSizeInBytes = numQuanta(sizeofFreeChunk, vm.getMinObjAlignmentInBytes()) *
                  vm.getMinObjAlignmentInBytes();

  Type type = db.lookupType("CompactibleFreeListSpace");
  collectorField = type.getAddressField("_collector");
  collectorField       = type.getAddressField("_collector");
  dictionaryField      = type.getAddressField("_dictionary");
  indexedFreeListField = type.getAddressField("_indexedFreeList[0]");
  smallLinearAllocBlockFieldOffset = type.getField("_smallLinearAllocBlock").getOffset();
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:14,代码来源:CompactibleFreeListSpace.java


示例17: 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();
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:10,代码来源:G1CollectedHeap.java



注:本文中的sun.jvm.hotspot.types.TypeDataBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IClasspathContainerPageExtension类代码示例发布时间:2022-05-22
下一篇:
Java JFXSlider类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap