agent/src/share/classes/sun/jvm/hotspot/opto/InlineTree.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/InlineTree.java

Print this page




  70 
  71   public ciMethod method() {
  72     return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress()));
  73   }
  74 
  75   public JVMState callerJvms() {
  76     return JVMState.create(callerJvmsField.getValue(getAddress()));
  77   }
  78 
  79   public int callerBci() {
  80     JVMState jvms = callerJvms();
  81     return (jvms != null) ? jvms.bci() : -1;
  82   }
  83 
  84   public GrowableArray<InlineTree> subtrees() {
  85     Address addr = getAddress().addOffsetTo(subtreesField.getOffset());
  86 
  87     return GrowableArray.create(addr, inlineTreeConstructor);
  88   }
  89 





  90   public void printImpl(PrintStream st, int indent) {
  91     for (int i = 0; i < indent; i++) st.print(" ");
  92     st.printf(" @ %d ", callerBci());
  93     method().printShortName(st);
  94     st.println();
  95 
  96     GrowableArray<InlineTree> subt = subtrees();
  97     for (int i = 0 ; i < subt.length(); i++) {
  98       subt.at(i).printImpl(st, indent + 2);
  99     }
 100   }
 101   public void print(PrintStream st) {
 102     printImpl(st, 2);
 103   }

























 104 }


  70 
  71   public ciMethod method() {
  72     return (ciMethod) ciObjectFactory.getMetadata(methodField.getValue(getAddress()));
  73   }
  74 
  75   public JVMState callerJvms() {
  76     return JVMState.create(callerJvmsField.getValue(getAddress()));
  77   }
  78 
  79   public int callerBci() {
  80     JVMState jvms = callerJvms();
  81     return (jvms != null) ? jvms.bci() : -1;
  82   }
  83 
  84   public GrowableArray<InlineTree> subtrees() {
  85     Address addr = getAddress().addOffsetTo(subtreesField.getOffset());
  86 
  87     return GrowableArray.create(addr, inlineTreeConstructor);
  88   }
  89 
  90   public int inlineLevel() {
  91     JVMState jvms = callerJvms();
  92     return (jvms != null) ? jvms.depth() : 0;
  93   }
  94 
  95   public void printImpl(PrintStream st, int indent) {
  96     for (int i = 0; i < indent; i++) st.print(" ");
  97     st.printf(" @ %d ", callerBci());
  98     method().printShortName(st);
  99     st.println();
 100 
 101     GrowableArray<InlineTree> subt = subtrees();
 102     for (int i = 0 ; i < subt.length(); i++) {
 103       subt.at(i).printImpl(st, indent + 2);
 104     }
 105   }
 106   public void print(PrintStream st) {
 107     printImpl(st, 2);
 108   }
 109 
 110   // Count number of nodes in this subtree
 111   public int count() {
 112     int result = 1;
 113     GrowableArray<InlineTree> subt = subtrees();
 114     for (int i = 0 ; i < subt.length(); i++) {
 115       result += subt.at(i).count();
 116     }
 117     return result;
 118   }
 119 
 120   public void dumpReplayData(PrintStream out) {
 121     out.printf(" %d %d ", inlineLevel(), callerBci());
 122 
 123     Method method = (Method)method().getMetadata();
 124     Klass holder = method.getMethodHolder();
 125     out.print(holder.getName().asString() + " " +
 126               OopUtilities.escapeString(method.getName().asString()) + " " +
 127               method.getSignature().asString());
 128     
 129     GrowableArray<InlineTree> subt = subtrees();
 130     for (int i = 0 ; i < subt.length(); i++) {
 131       subt.at(i).dumpReplayData(out);
 132     }    
 133   }
 134 }
agent/src/share/classes/sun/jvm/hotspot/opto/InlineTree.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File