Java Code Examples for sun.jvm.hotspot.types.TypeDataBase#lookupType()

The following examples show how to use sun.jvm.hotspot.types.TypeDataBase#lookupType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Method.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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;
}
 
Example 2
Source File: CodeBlob.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
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();
  }
}
 
Example 3
Source File: G1MonitoringSupport.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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");
}
 
Example 4
Source File: ImmutableOopMapPair.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static void initialize(TypeDataBase db) {
  Type type = db.lookupType("ImmutableOopMapPair");

  pcField = type.getCIntegerField("_pc_offset");
  offsetField = type.getCIntegerField("_oopmap_offset");
  classSize = type.getSize();
}
 
Example 5
Source File: G1HeapRegionTable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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");
}
 
Example 6
Source File: java_lang_Class.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 7
Source File: G1CollectedHeap.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
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();
}
 
Example 8
Source File: MethodArray.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
  elemType = db.lookupType("Method*");

  Type type = db.lookupType("Array<Method*>");
  dataFieldOffset = type.getAddressField("_data").getOffset();
}
 
Example 9
Source File: AdaptiveFreeList.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) {
  Type type = db.lookupType("AdaptiveFreeList<FreeChunk>");
  sizeField = type.getCIntegerField("_size");
  countField = type.getCIntegerField("_count");
  headerSize = type.getSize();
}
 
Example 10
Source File: HeapRegionSetBase.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
static private synchronized void initialize(TypeDataBase db) {
    Type type = db.lookupType("HeapRegionSetBase");

    countField = type.getField("_count").getOffset();
}
 
Example 11
Source File: IntArray.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
  elemType = db.lookupType("int");

  Type type = db.lookupType("Array<int>");
  dataFieldOffset = type.getAddressField("_data").getOffset();
}
 
Example 12
Source File: U1Array.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
  elemType = db.lookupType("u1");

  Type type = db.lookupType("Array<u1>");
  dataFieldOffset = type.getAddressField("_data").getOffset();
}
 
Example 13
Source File: GenericArray.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
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);
}
 
Example 14
Source File: U2Array.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
  elemType = db.lookupType("u2");
  Type type = db.lookupType("Array<u2>");
  dataFieldOffset = type.getAddressField("_data").getOffset();
}
 
Example 15
Source File: MethodArray.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
  elemType = db.lookupType("Method*");

  Type type = db.lookupType("Array<Method*>");
  dataFieldOffset = type.getAddressField("_data").getOffset();
}
 
Example 16
Source File: IntArray.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
  elemType = db.lookupType("int");

  Type type = db.lookupType("Array<int>");
  dataFieldOffset = type.getAddressField("_data").getOffset();
}
 
Example 17
Source File: AdaptiveFreeList.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private static synchronized void initialize(TypeDataBase db) {
  Type type = db.lookupType("AdaptiveFreeList<FreeChunk>");
  sizeField = type.getCIntegerField("_size");
  countField = type.getCIntegerField("_count");
  headerSize = type.getSize();
}
 
Example 18
Source File: HeapRegionSetCount.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
static private synchronized void initialize(TypeDataBase db) {
    Type type = db.lookupType("HeapRegionSetCount");

    lengthField   = type.getCIntegerField("_length");
    capacityField = type.getCIntegerField("_capacity");
}
 
Example 19
Source File: HeapRegion.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
static private synchronized void initialize(TypeDataBase db) {
    Type type = db.lookupType("HeapRegion");

    grainBytesField = type.getCIntegerField("GrainBytes");
    topField = type.getAddressField("_top");

}
 
Example 20
Source File: HeapRegion.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
static private synchronized void initialize(TypeDataBase db) {
    Type type = db.lookupType("HeapRegion");

    grainBytesField = type.getCIntegerField("GrainBytes");
    topField = type.getAddressField("_top");

}