comparison agent/src/share/classes/sun/jvm/hotspot/runtime/solaris_sparc/SolarisSPARCJavaThreadPDAccess.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 c18cbe5936b8
comparison
equal deleted inserted replaced
217:411c61adc994 218:a5838065ab24
119 public RegisterMap newRegisterMap(JavaThread thread, boolean updateMap) { 119 public RegisterMap newRegisterMap(JavaThread thread, boolean updateMap) {
120 return new SPARCRegisterMap(thread, updateMap); 120 return new SPARCRegisterMap(thread, updateMap);
121 } 121 }
122 122
123 public Frame getCurrentFrameGuess(JavaThread thread, Address addr) { 123 public Frame getCurrentFrameGuess(JavaThread thread, Address addr) {
124
125 // If java stack is walkable then both last_Java_sp and last_Java_pc are
126 // non null and we can start stack walk from this frame.
127 if (thread.getLastJavaSP() != null && thread.getLastJavaPC() != null) {
128 return new SPARCFrame(SPARCFrame.biasSP(thread.getLastJavaSP()), thread.getLastJavaPC());
129 }
130
124 ThreadProxy t = getThreadProxy(addr); 131 ThreadProxy t = getThreadProxy(addr);
125 SPARCThreadContext context = (SPARCThreadContext) t.getContext(); 132 SPARCThreadContext context = (SPARCThreadContext) t.getContext();
126 // For now, let's see what happens if we do a similar thing to 133 // For now, let's see what happens if we do a similar thing to
127 // what the runtime code does. I suspect this may cause us to lose 134 // what the runtime code does. I suspect this may cause us to lose
128 // the top frame from the stack. 135 // the top frame from the stack.