< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Oop.java

Print this page




 147   void iterateFields(OopVisitor visitor, boolean doVMFields) {
 148     if (doVMFields) {
 149       visitor.doCInt(mark, true);
 150       if (VM.getVM().isCompressedKlassPointersEnabled()) {
 151         visitor.doMetadata(compressedKlass, true);
 152       } else {
 153         visitor.doMetadata(klass, true);
 154       }
 155     }
 156   }
 157 
 158   public void print()      { printOn(System.out); }
 159   public void printValue() { printValueOn(System.out); }
 160   public void printRaw()   { printRawOn(System.out); }
 161 
 162   public static void printOopValueOn(Oop obj, PrintStream tty) {
 163     if (obj == null) {
 164       tty.print("null");
 165     } else {
 166       obj.printValueOn(tty);
 167       tty.print(" @ " + obj.getHandle());
 168     }
 169   }
 170 
 171   public static void printOopAddressOn(Oop obj, PrintStream tty) {
 172     if (obj == null) {
 173       tty.print("null");
 174     } else {
 175       tty.print(obj.getHandle().toString());
 176     }
 177   }
 178 
 179   public void printOn(PrintStream tty) {
 180     OopPrinter printer = new OopPrinter(tty);
 181     iterate(printer, true);
 182   }
 183 
 184   public void printValueOn(PrintStream tty) {
 185     try {
 186       tty.print("Oop for " + getKlass().getName().asString());
 187     } catch (java.lang.NullPointerException e) {




 147   void iterateFields(OopVisitor visitor, boolean doVMFields) {
 148     if (doVMFields) {
 149       visitor.doCInt(mark, true);
 150       if (VM.getVM().isCompressedKlassPointersEnabled()) {
 151         visitor.doMetadata(compressedKlass, true);
 152       } else {
 153         visitor.doMetadata(klass, true);
 154       }
 155     }
 156   }
 157 
 158   public void print()      { printOn(System.out); }
 159   public void printValue() { printValueOn(System.out); }
 160   public void printRaw()   { printRawOn(System.out); }
 161 
 162   public static void printOopValueOn(Oop obj, PrintStream tty) {
 163     if (obj == null) {
 164       tty.print("null");
 165     } else {
 166       obj.printValueOn(tty);
 167       tty.print(" @ " + VM.getVM().getUniverse().heap().oopAddressDescription(obj.getHandle()));
 168     }
 169   }
 170 
 171   public static void printOopAddressOn(Oop obj, PrintStream tty) {
 172     if (obj == null) {
 173       tty.print("null");
 174     } else {
 175       tty.print(obj.getHandle().toString());
 176     }
 177   }
 178 
 179   public void printOn(PrintStream tty) {
 180     OopPrinter printer = new OopPrinter(tty);
 181     iterate(printer, true);
 182   }
 183 
 184   public void printValueOn(PrintStream tty) {
 185     try {
 186       tty.print("Oop for " + getKlass().getName().asString());
 187     } catch (java.lang.NullPointerException e) {


< prev index next >