Mercurial > hg > graal-jvmci-8
annotate agent/src/share/classes/sun/jvm/hotspot/oops/Method.java @ 7183:b2dbd323c668
8003848: Make ConstMethod::generic_signature_index optional and move Method::_max_stack to ConstMethod.
Summary: Make ConstMethod::generic_signature_index optional and move Method::_max_stack to ConstMethod.
Reviewed-by: bdelsart, sspitsyn, coleenp
author | jiangli |
---|---|
date | Tue, 27 Nov 2012 17:03:56 -0500 |
parents | bd7a7ce2e264 |
children | fd74228fd5ca |
rev | line source |
---|---|
0 | 1 /* |
6123
2fe087c3e814
7172967: Eliminate constMethod's _method backpointer to methodOop.
jiangli
parents:
3939
diff
changeset
|
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 package sun.jvm.hotspot.oops; | |
26 | |
27 import java.io.*; | |
28 import java.util.*; | |
29 import sun.jvm.hotspot.code.*; | |
30 import sun.jvm.hotspot.debugger.*; | |
31 import sun.jvm.hotspot.interpreter.*; | |
32 import sun.jvm.hotspot.memory.*; | |
33 import sun.jvm.hotspot.runtime.*; | |
34 import sun.jvm.hotspot.types.*; | |
35 import sun.jvm.hotspot.utilities.*; | |
36 | |
37 // A Method represents a Java method | |
38 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
39 public class Method extends Metadata { |
0 | 40 static { |
41 VM.registerVMInitializedObserver(new Observer() { | |
42 public void update(Observable o, Object data) { | |
43 initialize(VM.getVM().getTypeDataBase()); | |
44 } | |
45 }); | |
46 } | |
47 | |
48 private static synchronized void initialize(TypeDataBase db) throws WrongTypeException { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
49 Type type = db.lookupType("Method"); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
50 constMethod = type.getAddressField("_constMethod"); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
51 methodData = type.getAddressField("_method_data"); |
0 | 52 methodSize = new CIntField(type.getCIntegerField("_method_size"), 0); |
53 maxLocals = new CIntField(type.getCIntegerField("_max_locals"), 0); | |
54 sizeOfParameters = new CIntField(type.getCIntegerField("_size_of_parameters"), 0); | |
55 accessFlags = new CIntField(type.getCIntegerField("_access_flags"), 0); | |
56 code = type.getAddressField("_code"); | |
57 vtableIndex = new CIntField(type.getCIntegerField("_vtable_index"), 0); | |
58 if (!VM.getVM().isCore()) { | |
59 invocationCounter = new CIntField(type.getCIntegerField("_invocation_counter"), 0); | |
3939 | 60 backedgeCounter = new CIntField(type.getCIntegerField("_backedge_counter"), 0); |
0 | 61 } |
62 bytecodeOffset = type.getSize(); | |
63 | |
3939 | 64 interpreterThrowoutCountField = new CIntField(type.getCIntegerField("_interpreter_throwout_count"), 0); |
65 interpreterInvocationCountField = new CIntField(type.getCIntegerField("_interpreter_invocation_count"), 0); | |
66 | |
0 | 67 /* |
68 interpreterEntry = type.getAddressField("_interpreter_entry"); | |
69 fromCompiledCodeEntryPoint = type.getAddressField("_from_compiled_code_entry_point"); | |
70 | |
71 */ | |
72 objectInitializerName = null; | |
73 classInitializerName = null; | |
74 } | |
75 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
76 public Method(Address addr) { |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
77 super(addr); |
0 | 78 } |
79 | |
80 public boolean isMethod() { return true; } | |
81 | |
82 // Fields | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
83 private static AddressField constMethod; |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
84 private static AddressField methodData; |
0 | 85 private static CIntField methodSize; |
86 private static CIntField maxLocals; | |
87 private static CIntField sizeOfParameters; | |
88 private static CIntField accessFlags; | |
89 private static CIntField vtableIndex; | |
90 private static CIntField invocationCounter; | |
3939 | 91 private static CIntField backedgeCounter; |
0 | 92 private static long bytecodeOffset; |
93 | |
94 private static AddressField code; | |
95 | |
3939 | 96 private static CIntField interpreterThrowoutCountField; |
97 private static CIntField interpreterInvocationCountField; | |
98 | |
0 | 99 // constant method names - <init>, <clinit> |
100 // Initialized lazily to avoid initialization ordering dependencies between Method and SymbolTable | |
101 private static Symbol objectInitializerName; | |
102 private static Symbol classInitializerName; | |
103 private static Symbol objectInitializerName() { | |
104 if (objectInitializerName == null) { | |
105 objectInitializerName = VM.getVM().getSymbolTable().probe("<init>"); | |
106 } | |
107 return objectInitializerName; | |
108 } | |
109 private static Symbol classInitializerName() { | |
110 if (classInitializerName == null) { | |
111 classInitializerName = VM.getVM().getSymbolTable().probe("<clinit>"); | |
112 } | |
113 return classInitializerName; | |
114 } | |
115 | |
116 | |
117 /* | |
118 private static AddressCField interpreterEntry; | |
119 private static AddressCField fromCompiledCodeEntryPoint; | |
120 */ | |
121 | |
122 // Accessors for declared fields | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
123 public ConstMethod getConstMethod() { |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
124 Address addr = constMethod.getValue(getAddress()); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
125 return (ConstMethod) VMObjectFactory.newObject(ConstMethod.class, addr); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
126 } |
6123
2fe087c3e814
7172967: Eliminate constMethod's _method backpointer to methodOop.
jiangli
parents:
3939
diff
changeset
|
127 public ConstantPool getConstants() { |
2fe087c3e814
7172967: Eliminate constMethod's _method backpointer to methodOop.
jiangli
parents:
3939
diff
changeset
|
128 return getConstMethod().getConstants(); |
2fe087c3e814
7172967: Eliminate constMethod's _method backpointer to methodOop.
jiangli
parents:
3939
diff
changeset
|
129 } |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
130 public MethodData getMethodData() { |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
131 Address addr = methodData.getValue(getAddress()); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
132 return (MethodData) VMObjectFactory.newObject(MethodData.class, addr); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
133 } |
0 | 134 /** WARNING: this is in words, not useful in this system; use getObjectSize() instead */ |
135 public long getMethodSize() { return methodSize.getValue(this); } | |
7183
b2dbd323c668
8003848: Make ConstMethod::generic_signature_index optional and move Method::_max_stack to ConstMethod.
jiangli
parents:
6972
diff
changeset
|
136 public long getMaxStack() { return getConstMethod().getMaxStack(); } |
0 | 137 public long getMaxLocals() { return maxLocals.getValue(this); } |
138 public long getSizeOfParameters() { return sizeOfParameters.getValue(this); } | |
139 public long getNameIndex() { return getConstMethod().getNameIndex(); } | |
140 public long getSignatureIndex() { return getConstMethod().getSignatureIndex(); } | |
141 public long getGenericSignatureIndex() { return getConstMethod().getGenericSignatureIndex(); } | |
142 public long getAccessFlags() { return accessFlags.getValue(this); } | |
143 public long getCodeSize() { return getConstMethod().getCodeSize(); } | |
144 public long getVtableIndex() { return vtableIndex.getValue(this); } | |
145 public long getInvocationCounter() { | |
146 if (Assert.ASSERTS_ENABLED) { | |
147 Assert.that(!VM.getVM().isCore(), "must not be used in core build"); | |
148 } | |
149 return invocationCounter.getValue(this); | |
150 } | |
3939 | 151 public long getBackedgeCounter() { |
152 if (Assert.ASSERTS_ENABLED) { | |
153 Assert.that(!VM.getVM().isCore(), "must not be used in core build"); | |
154 } | |
155 return backedgeCounter.getValue(this); | |
156 } | |
0 | 157 |
158 // get associated compiled native method, if available, else return null. | |
159 public NMethod getNativeMethod() { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
160 Address addr = code.getValue(getAddress()); |
0 | 161 return (NMethod) VMObjectFactory.newObject(NMethod.class, addr); |
162 } | |
163 | |
164 // Convenience routine | |
165 public AccessFlags getAccessFlagsObj() { | |
166 return new AccessFlags(getAccessFlags()); | |
167 } | |
168 | |
169 /** Get a bytecode or breakpoint at the given bci */ | |
170 public int getBytecodeOrBPAt(int bci) { | |
171 return getConstMethod().getBytecodeOrBPAt(bci); | |
172 } | |
173 | |
174 /** Fetch the original non-breakpoint bytecode at the specified | |
175 bci. It is required that there is currently a bytecode at this | |
176 bci. */ | |
177 public int getOrigBytecodeAt(int bci) { | |
6940
18fb7da42534
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
coleenp
parents:
6725
diff
changeset
|
178 BreakpointInfo bp = getMethodHolder().getBreakpoints(); |
0 | 179 for (; bp != null; bp = bp.getNext()) { |
180 if (bp.match(this, bci)) { | |
181 return bp.getOrigBytecode(); | |
182 } | |
183 } | |
184 System.err.println("Requested bci " + bci); | |
185 for (; bp != null; bp = bp.getNext()) { | |
186 System.err.println("Breakpoint at bci " + bp.getBCI() + ", bytecode " + | |
187 bp.getOrigBytecode()); | |
188 } | |
189 Assert.that(false, "Should not reach here"); | |
190 return -1; // not reached | |
191 } | |
192 | |
193 public byte getBytecodeByteArg(int bci) { | |
194 return getConstMethod().getBytecodeByteArg(bci); | |
195 } | |
196 | |
197 /** Fetches a 16-bit big-endian ("Java ordered") value from the | |
198 bytecode stream */ | |
199 public short getBytecodeShortArg(int bci) { | |
200 return getConstMethod().getBytecodeShortArg(bci); | |
201 } | |
202 | |
3838
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
203 /** Fetches a 16-bit native ordered value from the |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
204 bytecode stream */ |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
205 public short getNativeShortArg(int bci) { |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
206 return getConstMethod().getNativeShortArg(bci); |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
207 } |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
208 |
0 | 209 /** Fetches a 32-bit big-endian ("Java ordered") value from the |
210 bytecode stream */ | |
211 public int getBytecodeIntArg(int bci) { | |
212 return getConstMethod().getBytecodeIntArg(bci); | |
213 } | |
214 | |
3838
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
215 /** Fetches a 32-bit native ordered value from the |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
216 bytecode stream */ |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
217 public int getNativeIntArg(int bci) { |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
218 return getConstMethod().getNativeIntArg(bci); |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
219 } |
6a991dcb52bb
7012081: JSR 292: SA-JDI can't read MH/MT/Indy ConstantPool entries
never
parents:
2426
diff
changeset
|
220 |
0 | 221 public byte[] getByteCode() { |
222 return getConstMethod().getByteCode(); | |
223 } | |
224 | |
225 /* | |
226 public Address getCode() { return codeField.getValue(this); } | |
227 public Address getInterpreterEntry() { return interpreterEntryField.getValue(this); } | |
228 public Address getFromCompiledCodeEntryPoint() { return fromCompiledCodeEntryPointField.getValue(this); } | |
229 */ | |
230 // Accessors | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1552
diff
changeset
|
231 public Symbol getName() { return getConstants().getSymbolAt(getNameIndex()); } |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1552
diff
changeset
|
232 public Symbol getSignature() { return getConstants().getSymbolAt(getSignatureIndex()); } |
0 | 233 public Symbol getGenericSignature() { |
234 long index = getGenericSignatureIndex(); | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1552
diff
changeset
|
235 return (index != 0L) ? getConstants().getSymbolAt(index) : null; |
0 | 236 } |
237 | |
238 // Method holder (the Klass holding this method) | |
6940
18fb7da42534
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
coleenp
parents:
6725
diff
changeset
|
239 public InstanceKlass getMethodHolder() { return getConstants().getPoolHolder(); } |
0 | 240 |
241 // Access flags | |
242 public boolean isPublic() { return getAccessFlagsObj().isPublic(); } | |
243 public boolean isPrivate() { return getAccessFlagsObj().isPrivate(); } | |
244 public boolean isProtected() { return getAccessFlagsObj().isProtected(); } | |
245 public boolean isPackagePrivate() { AccessFlags af = getAccessFlagsObj(); | |
246 return (!af.isPublic() && !af.isPrivate() && !af.isProtected()); } | |
247 public boolean isStatic() { return getAccessFlagsObj().isStatic(); } | |
248 public boolean isFinal() { return getAccessFlagsObj().isFinal(); } | |
249 public boolean isSynchronized() { return getAccessFlagsObj().isSynchronized(); } | |
250 public boolean isBridge() { return getAccessFlagsObj().isBridge(); } | |
251 public boolean isVarArgs() { return getAccessFlagsObj().isVarArgs(); } | |
252 public boolean isNative() { return getAccessFlagsObj().isNative(); } | |
253 public boolean isAbstract() { return getAccessFlagsObj().isAbstract(); } | |
254 public boolean isStrict() { return getAccessFlagsObj().isStrict(); } | |
255 public boolean isSynthetic() { return getAccessFlagsObj().isSynthetic(); } | |
256 | |
257 public boolean isConstructor() { | |
258 return (!isStatic()) && getName().equals(objectInitializerName()); | |
259 } | |
260 | |
261 public boolean isStaticInitializer() { | |
262 return isStatic() && getName().equals(classInitializerName()); | |
263 } | |
264 | |
265 public boolean isObsolete() { | |
266 return getAccessFlagsObj().isObsolete(); | |
267 } | |
268 | |
269 public OopMapCacheEntry getMaskFor(int bci) { | |
270 OopMapCacheEntry entry = new OopMapCacheEntry(); | |
271 entry.fill(this, bci); | |
272 return entry; | |
273 } | |
274 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
275 public long getSize() { |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
276 return getMethodSize(); |
0 | 277 } |
278 | |
279 public void printValueOn(PrintStream tty) { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
280 tty.print("Method " + getName().asString() + getSignature().asString() + "@" + getAddress()); |
0 | 281 } |
282 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
283 public void iterateFields(MetadataVisitor visitor) { |
0 | 284 visitor.doCInt(methodSize, true); |
285 visitor.doCInt(maxLocals, true); | |
286 visitor.doCInt(sizeOfParameters, true); | |
287 visitor.doCInt(accessFlags, true); | |
288 } | |
289 | |
290 public boolean hasLineNumberTable() { | |
291 return getConstMethod().hasLineNumberTable(); | |
292 } | |
293 | |
294 public int getLineNumberFromBCI(int bci) { | |
295 return getConstMethod().getLineNumberFromBCI(bci); | |
296 } | |
297 | |
298 public LineNumberTableElement[] getLineNumberTable() { | |
299 return getConstMethod().getLineNumberTable(); | |
300 } | |
301 | |
302 public boolean hasLocalVariableTable() { | |
303 return getConstMethod().hasLocalVariableTable(); | |
304 } | |
305 | |
306 /** Should only be called if table is present */ | |
307 public LocalVariableTableElement[] getLocalVariableTable() { | |
308 return getConstMethod().getLocalVariableTable(); | |
309 } | |
310 | |
311 public Symbol getLocalVariableName(int bci, int slot) { | |
312 if (! hasLocalVariableTable()) { | |
313 return null; | |
314 } | |
315 | |
316 LocalVariableTableElement[] locals = getLocalVariableTable(); | |
317 for (int l = 0; l < locals.length; l++) { | |
318 LocalVariableTableElement local = locals[l]; | |
319 if ((bci >= local.getStartBCI()) && | |
320 (bci < (local.getStartBCI() + local.getLength())) && | |
321 slot == local.getSlot()) { | |
322 return getConstants().getSymbolAt(local.getNameCPIndex()); | |
323 } | |
324 } | |
325 | |
326 return null; | |
327 } | |
328 | |
6213
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
329 public boolean hasExceptionTable() { |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
330 return getConstMethod().hasExceptionTable(); |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
331 } |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
332 |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
333 public ExceptionTableElement[] getExceptionTable() { |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
334 return getConstMethod().getExceptionTable(); |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
335 } |
8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
jiangli
parents:
6123
diff
changeset
|
336 |
0 | 337 public boolean hasCheckedExceptions() { |
338 return getConstMethod().hasCheckedExceptions(); | |
339 } | |
340 | |
341 /** Should only be called if table is present */ | |
342 public CheckedExceptionElement[] getCheckedExceptions() { | |
343 return getConstMethod().getCheckedExceptions(); | |
344 } | |
345 | |
346 /** Returns name and signature in external form for debugging | |
347 purposes */ | |
348 public String externalNameAndSignature() { | |
349 final StringBuffer buf = new StringBuffer(); | |
350 buf.append(getMethodHolder().getName().asString()); | |
351 buf.append("."); | |
352 buf.append(getName().asString()); | |
353 buf.append("("); | |
354 new SignatureConverter(getSignature(), buf).iterateParameters(); | |
355 buf.append(")"); | |
356 return buf.toString().replace('/', '.'); | |
357 } | |
6972
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
358 |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
359 public void dumpReplayData(PrintStream out) { |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
360 NMethod nm = getNativeMethod(); |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
361 int code_size = 0; |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
362 if (nm != null) { |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
363 code_size = (int)nm.codeEnd().minus(nm.getVerifiedEntryPoint()); |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
364 } |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
365 Klass holder = getMethodHolder(); |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
366 out.println("ciMethod " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
367 holder.getName().asString() + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
368 OopUtilities.escapeString(getName().asString()) + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
369 getSignature().asString() + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
370 getInvocationCounter() + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
371 getBackedgeCounter() + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
372 interpreterInvocationCount() + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
373 interpreterThrowoutCount() + " " + |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
374 code_size); |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
375 } |
bd7a7ce2e264
6830717: replay of compilations would help with debugging
minqi
parents:
6940
diff
changeset
|
376 |
3939 | 377 public int interpreterThrowoutCount() { |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
378 return (int) interpreterThrowoutCountField.getValue(this); |
3939 | 379 } |
380 | |
381 public int interpreterInvocationCount() { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6213
diff
changeset
|
382 return (int) interpreterInvocationCountField.getValue(this); |
3939 | 383 } |
0 | 384 } |