< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java

Print this page




 147     return heap().isIn(p);
 148   }
 149 
 150   /** Returns "TRUE" iff "p" points into the reserved area of the heap. */
 151   public boolean isInReserved(Address p) {
 152     return heap().isInReserved(p);
 153   }
 154 
 155   private Oop newOop(OopHandle handle) {
 156     return VM.getVM().getObjectHeap().newOop(handle);
 157   }
 158 
 159   public Oop mainThreadGroup() {
 160     return newOop(mainThreadGroupField.getValue());
 161   }
 162 
 163   public Oop systemThreadGroup() {
 164     return newOop(systemThreadGroupField.getValue());
 165   }
 166 
 167   // iterate through the single dimensional primitive array klasses
 168   // refer to basic_type_classes_do(void f(Klass*)) in universe.cpp
 169   public void basicTypeClassesDo(SystemDictionary.ClassVisitor visitor) {
 170     visitor.visit(new TypeArrayKlass(boolArrayKlassField.getValue()));
 171     visitor.visit(new TypeArrayKlass(byteArrayKlassField.getValue()));
 172     visitor.visit(new TypeArrayKlass(charArrayKlassField.getValue()));
 173     visitor.visit(new TypeArrayKlass(intArrayKlassField.getValue()));
 174     visitor.visit(new TypeArrayKlass(shortArrayKlassField.getValue()));
 175     visitor.visit(new TypeArrayKlass(longArrayKlassField.getValue()));
 176     visitor.visit(new TypeArrayKlass(singleArrayKlassField.getValue()));
 177     visitor.visit(new TypeArrayKlass(doubleArrayKlassField.getValue()));
 178   }
 179 
 180   public void print() { printOn(System.out); }
 181   public void printOn(PrintStream tty) {
 182     heap().printOn(tty);
 183   }
 184 
 185   // Check whether an element of a typeArrayOop with the given type must be
 186   // aligned 0 mod 8.  The typeArrayOop itself must be aligned at least this
 187   // strongly.
 188   public static boolean elementTypeShouldBeAligned(BasicType type) {
 189     return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
 190   }
 191 
 192   // Check whether an object field (static/non-static) of the given type must be
 193   // aligned 0 mod 8.
 194   public static boolean fieldTypeShouldBeAligned(BasicType type) {
 195     return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
 196   }
 197 }


 147     return heap().isIn(p);
 148   }
 149 
 150   /** Returns "TRUE" iff "p" points into the reserved area of the heap. */
 151   public boolean isInReserved(Address p) {
 152     return heap().isInReserved(p);
 153   }
 154 
 155   private Oop newOop(OopHandle handle) {
 156     return VM.getVM().getObjectHeap().newOop(handle);
 157   }
 158 
 159   public Oop mainThreadGroup() {
 160     return newOop(mainThreadGroupField.getValue());
 161   }
 162 
 163   public Oop systemThreadGroup() {
 164     return newOop(systemThreadGroupField.getValue());
 165   }
 166 












 167 
 168   public void print() { printOn(System.out); }
 169   public void printOn(PrintStream tty) {
 170     heap().printOn(tty);
 171   }
 172 
 173   // Check whether an element of a typeArrayOop with the given type must be
 174   // aligned 0 mod 8.  The typeArrayOop itself must be aligned at least this
 175   // strongly.
 176   public static boolean elementTypeShouldBeAligned(BasicType type) {
 177     return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
 178   }
 179 
 180   // Check whether an object field (static/non-static) of the given type must be
 181   // aligned 0 mod 8.
 182   public static boolean fieldTypeShouldBeAligned(BasicType type) {
 183     return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
 184   }
 185 }
< prev index next >