agent/src/share/classes/sun/jvm/hotspot/opto/JVMState.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8028468 Sdiff agent/src/share/classes/sun/jvm/hotspot/opto

agent/src/share/classes/sun/jvm/hotspot/opto/JVMState.java

Print this page




  71   private static CIntField depthField;
  72   private static AddressField callerField;
  73 
  74   public static JVMState create(Address addr) {
  75     if (addr == null) return null;
  76     return new JVMState(addr);
  77   }
  78 
  79   public JVMState(Address addr) {
  80     super(addr);
  81   }
  82 
  83   public ciMethod method() {
  84     return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress()));
  85   }
  86 
  87   public int bci() {
  88     return (int)bciField.getValue(getAddress());
  89   }
  90 




  91   public JVMState caller() {
  92     return create(callerField.getValue(getAddress()));
  93   }
  94 
  95   public void dumpSpec(PrintStream out) {
  96     ciMethod m = method();
  97     if (m != null) {
  98       Method meth = m.method();
  99       out.print(" " + meth.getMethodHolder().getName().asString().replace('/', '.') + "::" +
 100                 meth.getName().asString() + " @ bci:" + bci());
 101     } else {
 102       out.print(" runtime stub");
 103     }
 104     if (caller() != null)  caller().dumpSpec(out);
 105   }
 106 }


  71   private static CIntField depthField;
  72   private static AddressField callerField;
  73 
  74   public static JVMState create(Address addr) {
  75     if (addr == null) return null;
  76     return new JVMState(addr);
  77   }
  78 
  79   public JVMState(Address addr) {
  80     super(addr);
  81   }
  82 
  83   public ciMethod method() {
  84     return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress()));
  85   }
  86 
  87   public int bci() {
  88     return (int)bciField.getValue(getAddress());
  89   }
  90 
  91   public int depth() {
  92     return (int)depthField.getValue(getAddress());
  93   }
  94 
  95   public JVMState caller() {
  96     return create(callerField.getValue(getAddress()));
  97   }
  98 
  99   public void dumpSpec(PrintStream out) {
 100     ciMethod m = method();
 101     if (m != null) {
 102       Method meth = m.method();
 103       out.print(" " + meth.getMethodHolder().getName().asString().replace('/', '.') + "::" +
 104                 meth.getName().asString() + " @ bci:" + bci());
 105     } else {
 106       out.print(" runtime stub");
 107     }
 108     if (caller() != null)  caller().dumpSpec(out);
 109   }
 110 }
agent/src/share/classes/sun/jvm/hotspot/opto/JVMState.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File