< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java

Print this page
rev 12637 : 8174957: [JVMCI] jaotc is broken in Xcomp mode


  21  * questions.
  22  */
  23 package jdk.vm.ci.hotspot;
  24 
  25 /**
  26  * Describes a C++ field exposed via {@link HotSpotVMConfigAccess}.
  27  */
  28 public final class VMField {
  29 
  30     /**
  31      * Fully qualified name of the represented field (e.g., "Klass::_name").
  32      */
  33     public final String name;
  34 
  35     /**
  36      * The represented field's type (e.g., "Symbol*"). This may be {@code null}.
  37      */
  38     public final String type;
  39 
  40     /**
  41      * If represented field is non-static, this is its offset within the containing structure.
  42      */
  43     public final long offset;
  44 
  45     /**
  46      * If represented field is static, this is its address. Otherwise, this field is 0.
  47      */
  48     public final long address;
  49 
  50     /**
  51      * Value of the field represented as a boxed long; only valid for non-oop static fields. This
  52      * value is only captured once, during JVMCI initialization. If {@link #type} cannot be
  53      * meaningfully (e.g., a struct) or safely (e.g., an oop) expressed as a boxed long, this is
  54      * {@code null}.
  55      */
  56     public final Long value;
  57 
  58     /**
  59      * Determines if the represented field is static.
  60      */
  61     public boolean isStatic() {
  62         return address != 0;
  63     }
  64 
  65     /**
  66      * Creates a description of a non-static field.
  67      */
  68     public VMField(String name, String type, long offset) {
  69         this.name = name;
  70         this.type = type;
  71         this.offset = offset;
  72         this.address = 0;
  73         this.value = null;
  74     }
  75 
  76     /**


  21  * questions.
  22  */
  23 package jdk.vm.ci.hotspot;
  24 
  25 /**
  26  * Describes a C++ field exposed via {@link HotSpotVMConfigAccess}.
  27  */
  28 public final class VMField {
  29 
  30     /**
  31      * Fully qualified name of the represented field (e.g., "Klass::_name").
  32      */
  33     public final String name;
  34 
  35     /**
  36      * The represented field's type (e.g., "Symbol*"). This may be {@code null}.
  37      */
  38     public final String type;
  39 
  40     /**
  41      * If the represented field is non-static, this is its offset within the containing structure.
  42      */
  43     public final long offset;
  44 
  45     /**
  46      * If the represented field is static, this is its address. Otherwise, this is 0.
  47      */
  48     public final long address;
  49 
  50     /**
  51      * Value of the field represented as a boxed boolean if its C++ type is bool otherwise as a
  52      * boxed long; only valid for non-oop static fields. This value is only captured once, during
  53      * JVMCI initialization. If {@link #type} cannot be meaningfully (e.g., a struct) or safely
  54      * (e.g., an oop) expressed as a boxed object, this is {@code null}.
  55      */
  56     public final Object value;
  57 
  58     /**
  59      * Determines if the represented field is static.
  60      */
  61     public boolean isStatic() {
  62         return address != 0;
  63     }
  64 
  65     /**
  66      * Creates a description of a non-static field.
  67      */
  68     public VMField(String name, String type, long offset) {
  69         this.name = name;
  70         this.type = type;
  71         this.offset = offset;
  72         this.address = 0;
  73         this.value = null;
  74     }
  75 
  76     /**
< prev index next >