Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/opto/InlineTree.java @ 14232:183bd5c00828
8028468: Add inlining information into ciReplay
Summary: Allow dump and replay inlining for specified method during a program execution.
Reviewed-by: roland, twisti
author | kvn |
---|---|
date | Wed, 08 Jan 2014 10:25:50 -0800 |
parents | 79f492f184d0 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14231:303c352ba1a8 | 14232:183bd5c00828 |
---|---|
85 Address addr = getAddress().addOffsetTo(subtreesField.getOffset()); | 85 Address addr = getAddress().addOffsetTo(subtreesField.getOffset()); |
86 | 86 |
87 return GrowableArray.create(addr, inlineTreeConstructor); | 87 return GrowableArray.create(addr, inlineTreeConstructor); |
88 } | 88 } |
89 | 89 |
90 public int inlineLevel() { | |
91 JVMState jvms = callerJvms(); | |
92 return (jvms != null) ? jvms.depth() : 0; | |
93 } | |
94 | |
90 public void printImpl(PrintStream st, int indent) { | 95 public void printImpl(PrintStream st, int indent) { |
91 for (int i = 0; i < indent; i++) st.print(" "); | 96 for (int i = 0; i < indent; i++) st.print(" "); |
92 st.printf(" @ %d ", callerBci()); | 97 st.printf(" @ %d ", callerBci()); |
93 method().printShortName(st); | 98 method().printShortName(st); |
94 st.println(); | 99 st.println(); |
99 } | 104 } |
100 } | 105 } |
101 public void print(PrintStream st) { | 106 public void print(PrintStream st) { |
102 printImpl(st, 2); | 107 printImpl(st, 2); |
103 } | 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 Method method = (Method)method().getMetadata(); | |
123 Klass holder = method.getMethodHolder(); | |
124 out.print(holder.getName().asString() + " " + | |
125 OopUtilities.escapeString(method.getName().asString()) + " " + | |
126 method.getSignature().asString()); | |
127 | |
128 GrowableArray<InlineTree> subt = subtrees(); | |
129 for (int i = 0 ; i < subt.length(); i++) { | |
130 subt.at(i).dumpReplayData(out); | |
131 } | |
132 } | |
104 } | 133 } |