Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java @ 218:a5838065ab24
6620329: jstack prints double native methods on Solaris/sparc
Summary: Fixed stack walking code in sparc to start frame walk from last_java_sp.
Reviewed-by: sgoldman
author | swamyv |
---|---|
date | Tue, 24 Jun 2008 21:37:10 -0700 |
parents | a61af66fc99e |
children | b9fba36710f2 |
comparison
equal
deleted
inserted
replaced
217:411c61adc994 | 218:a5838065ab24 |
---|---|
213 RegisterMap regMap = newRegisterMap(true); | 213 RegisterMap regMap = newRegisterMap(true); |
214 sun.jvm.hotspot.runtime.Frame f = getCurrentFrameGuess(); | 214 sun.jvm.hotspot.runtime.Frame f = getCurrentFrameGuess(); |
215 if (f == null) return null; | 215 if (f == null) return null; |
216 boolean imprecise = true; | 216 boolean imprecise = true; |
217 if (f.isInterpretedFrame() && !f.isInterpretedFrameValid()) { | 217 if (f.isInterpretedFrame() && !f.isInterpretedFrameValid()) { |
218 if (DEBUG) { | 218 if (DEBUG) { |
219 System.out.println("Correcting for invalid interpreter frame"); | 219 System.out.println("Correcting for invalid interpreter frame"); |
220 } | 220 } |
221 f = f.sender(regMap); | 221 f = f.sender(regMap); |
222 imprecise = false; | 222 imprecise = false; |
223 } | 223 } |
224 VFrame vf = VFrame.newVFrame(f, regMap, this, true, imprecise); | 224 VFrame vf = VFrame.newVFrame(f, regMap, this, true, imprecise); |
225 if (vf == null) { | 225 if (vf == null) { |
226 if (DEBUG) { | 226 if (DEBUG) { |
227 System.out.println(" (Unable to create vframe for topmost frame guess)"); | 227 System.out.println(" (Unable to create vframe for topmost frame guess)"); |
228 } | 228 } |
229 return null; | 229 return null; |
230 } | 230 } |
231 if (vf.isJavaFrame()) { | 231 return vf.isJavaFrame() ? (JavaVFrame)vf : vf.javaSender(); |
232 return (JavaVFrame) vf; | |
233 } | |
234 return (JavaVFrame) vf.javaSender(); | |
235 } | 232 } |
236 | 233 |
237 /** In this system, a JavaThread is the top-level factory for a | 234 /** In this system, a JavaThread is the top-level factory for a |
238 RegisterMap, since the JavaThread implementation is already | 235 RegisterMap, since the JavaThread implementation is already |
239 platform-specific and RegisterMap is also necessarily | 236 platform-specific and RegisterMap is also necessarily |