agent/src/share/classes/sun/jvm/hotspot/opto/InlineTree.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/agent/src/share/classes/sun/jvm/hotspot/opto/InlineTree.java	Fri Dec 27 17:10:15 2013
--- new/agent/src/share/classes/sun/jvm/hotspot/opto/InlineTree.java	Fri Dec 27 17:10:15 2013

*** 85,94 **** --- 85,99 ---- Address addr = getAddress().addOffsetTo(subtreesField.getOffset()); return GrowableArray.create(addr, inlineTreeConstructor); } + public int inlineLevel() { + JVMState jvms = callerJvms(); + return (jvms != null) ? jvms.depth() : 0; + } + public void printImpl(PrintStream st, int indent) { for (int i = 0; i < indent; i++) st.print(" "); st.printf(" @ %d ", callerBci()); method().printShortName(st); st.println();
*** 99,104 **** --- 104,134 ---- } } public void print(PrintStream st) { printImpl(st, 2); } + + // Count number of nodes in this subtree + public int count() { + int result = 1; + GrowableArray<InlineTree> subt = subtrees(); + for (int i = 0 ; i < subt.length(); i++) { + result += subt.at(i).count(); + } + return result; + } + + public void dumpReplayData(PrintStream out) { + out.printf(" %d %d ", inlineLevel(), callerBci()); + + Method method = (Method)method().getMetadata(); + Klass holder = method.getMethodHolder(); + out.print(holder.getName().asString() + " " + + OopUtilities.escapeString(method.getName().asString()) + " " + + method.getSignature().asString()); + + GrowableArray<InlineTree> subt = subtrees(); + for (int i = 0 ; i < subt.length(); i++) { + subt.at(i).dumpReplayData(out); + } + } }

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