Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java @ 1040:873ec3787992
6892186: SA does not dump debug info for scalar replaced objects
Summary: Implement scalar replaced objects debug info dump in SA.
Reviewed-by: twisti
author | kvn |
---|---|
date | Wed, 21 Oct 2009 09:15:33 -0700 |
parents | 148e5441d916 |
children | c18cbe5936b8 1a5913bf5e19 |
comparison
equal
deleted
inserted
replaced
1039:987e948ebbc8 | 1040:873ec3787992 |
---|---|
40 /** != InvocationEntryBci if this nmethod is an on-stack replacement method */ | 40 /** != InvocationEntryBci if this nmethod is an on-stack replacement method */ |
41 private static CIntegerField entryBCIField; | 41 private static CIntegerField entryBCIField; |
42 /** To support simple linked-list chaining of nmethods */ | 42 /** To support simple linked-list chaining of nmethods */ |
43 private static AddressField osrLinkField; | 43 private static AddressField osrLinkField; |
44 private static AddressField scavengeRootLinkField; | 44 private static AddressField scavengeRootLinkField; |
45 private static CIntegerField scavengeRootStateField; | 45 private static JByteField scavengeRootStateField; |
46 | 46 |
47 /** Offsets for different nmethod parts */ | 47 /** Offsets for different nmethod parts */ |
48 private static CIntegerField exceptionOffsetField; | 48 private static CIntegerField exceptionOffsetField; |
49 private static CIntegerField deoptOffsetField; | 49 private static CIntegerField deoptOffsetField; |
50 private static CIntegerField origPCOffsetField; | 50 private static CIntegerField origPCOffsetField; |
90 zombieInstructionSizeField = type.getCIntegerField("_zombie_instruction_size"); | 90 zombieInstructionSizeField = type.getCIntegerField("_zombie_instruction_size"); |
91 methodField = type.getOopField("_method"); | 91 methodField = type.getOopField("_method"); |
92 entryBCIField = type.getCIntegerField("_entry_bci"); | 92 entryBCIField = type.getCIntegerField("_entry_bci"); |
93 osrLinkField = type.getAddressField("_osr_link"); | 93 osrLinkField = type.getAddressField("_osr_link"); |
94 scavengeRootLinkField = type.getAddressField("_scavenge_root_link"); | 94 scavengeRootLinkField = type.getAddressField("_scavenge_root_link"); |
95 scavengeRootStateField = type.getCIntegerField("_scavenge_root_state"); | 95 scavengeRootStateField = type.getJByteField("_scavenge_root_state"); |
96 | 96 |
97 exceptionOffsetField = type.getCIntegerField("_exception_offset"); | 97 exceptionOffsetField = type.getCIntegerField("_exception_offset"); |
98 deoptOffsetField = type.getCIntegerField("_deoptimize_offset"); | 98 deoptOffsetField = type.getCIntegerField("_deoptimize_offset"); |
99 origPCOffsetField = type.getCIntegerField("_orig_pc_offset"); | 99 origPCOffsetField = type.getCIntegerField("_orig_pc_offset"); |
100 stubOffsetField = type.getCIntegerField("_stub_offset"); | 100 stubOffsetField = type.getCIntegerField("_stub_offset"); |
272 public ScopeDesc getScopeDescAt(Address pc) { | 272 public ScopeDesc getScopeDescAt(Address pc) { |
273 PCDesc pd = getPCDescAt(pc); | 273 PCDesc pd = getPCDescAt(pc); |
274 if (Assert.ASSERTS_ENABLED) { | 274 if (Assert.ASSERTS_ENABLED) { |
275 Assert.that(pd != null, "scope must be present"); | 275 Assert.that(pd != null, "scope must be present"); |
276 } | 276 } |
277 return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getReexecute()); | 277 return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getObjDecodeOffset(), pd.getReexecute()); |
278 } | 278 } |
279 | 279 |
280 /** This is only for use by the debugging system, and is only | 280 /** This is only for use by the debugging system, and is only |
281 intended for use in the topmost frame, where we are not | 281 intended for use in the topmost frame, where we are not |
282 guaranteed to be at a PC for which we have a PCDesc. It finds | 282 guaranteed to be at a PC for which we have a PCDesc. It finds |
304 return NULL for compiled methods which don't have any | 304 return NULL for compiled methods which don't have any |
305 ScopeDescs! */ | 305 ScopeDescs! */ |
306 public ScopeDesc getScopeDescNearDbg(Address pc) { | 306 public ScopeDesc getScopeDescNearDbg(Address pc) { |
307 PCDesc pd = getPCDescNearDbg(pc); | 307 PCDesc pd = getPCDescNearDbg(pc); |
308 if (pd == null) return null; | 308 if (pd == null) return null; |
309 return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getReexecute()); | 309 return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getObjDecodeOffset(), pd.getReexecute()); |
310 } | 310 } |
311 | 311 |
312 public Map/*<Address, PcDesc>*/ getSafepoints() { | 312 public Map/*<Address, PCDesc>*/ getSafepoints() { |
313 Map safepoints = new HashMap(); // Map<Address, PcDesc> | 313 Map safepoints = new HashMap(); // Map<Address, PCDesc> |
314 sun.jvm.hotspot.debugger.Address p = null; | 314 sun.jvm.hotspot.debugger.Address p = null; |
315 for (p = scopesPCsBegin(); p.lessThan(scopesPCsEnd()); | 315 for (p = scopesPCsBegin(); p.lessThan(scopesPCsEnd()); |
316 p = p.addOffsetTo(pcDescSize)) { | 316 p = p.addOffsetTo(pcDescSize)) { |
317 PCDesc pcDesc = new PCDesc(p); | 317 PCDesc pcDesc = new PCDesc(p); |
318 sun.jvm.hotspot.debugger.Address pc = pcDesc.getRealPC(this); | 318 sun.jvm.hotspot.debugger.Address pc = pcDesc.getRealPC(this); |