equal
deleted
inserted
replaced
78 vframeStreamForte(JavaThread *jt, frame fr, bool stop_at_java_call_stub); |
78 vframeStreamForte(JavaThread *jt, frame fr, bool stop_at_java_call_stub); |
79 void forte_next(); |
79 void forte_next(); |
80 }; |
80 }; |
81 |
81 |
82 |
82 |
83 static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, nmethod* nm); |
83 static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, CompiledMethod* nm); |
84 static bool is_decipherable_interpreted_frame(JavaThread* thread, |
84 static bool is_decipherable_interpreted_frame(JavaThread* thread, |
85 frame* fr, |
85 frame* fr, |
86 Method** method_p, |
86 Method** method_p, |
87 int* bci_p); |
87 int* bci_p); |
88 |
88 |
142 |
142 |
143 } while (!fill_from_frame()); |
143 } while (!fill_from_frame()); |
144 } |
144 } |
145 |
145 |
146 // Determine if 'fr' is a decipherable compiled frame. We are already |
146 // Determine if 'fr' is a decipherable compiled frame. We are already |
147 // assured that fr is for a java nmethod. |
147 // assured that fr is for a java compiled method. |
148 |
148 |
149 static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, nmethod* nm) { |
149 static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, CompiledMethod* nm) { |
150 assert(nm->is_java_method(), "invariant"); |
150 assert(nm->is_java_method(), "invariant"); |
151 |
151 |
152 if (thread->has_last_Java_frame() && thread->last_Java_pc() == fr->pc()) { |
152 if (thread->has_last_Java_frame() && thread->last_Java_pc() == fr->pc()) { |
153 // We're stopped at a call into the JVM so look for a PcDesc with |
153 // We're stopped at a call into the JVM so look for a PcDesc with |
154 // the actual pc reported by the frame. |
154 // the actual pc reported by the frame. |
159 pc_desc->scope_decode_offset() != DebugInformationRecorder::serialized_null) { |
159 pc_desc->scope_decode_offset() != DebugInformationRecorder::serialized_null) { |
160 return true; |
160 return true; |
161 } |
161 } |
162 } |
162 } |
163 |
163 |
164 // We're at some random pc in the nmethod so search for the PcDesc |
164 // We're at some random pc in the compiled method so search for the PcDesc |
165 // whose pc is greater than the current PC. It's done this way |
165 // whose pc is greater than the current PC. It's done this way |
166 // because the extra PcDescs that are recorded for improved debug |
166 // because the extra PcDescs that are recorded for improved debug |
167 // info record the end of the region covered by the ScopeDesc |
167 // info record the end of the region covered by the ScopeDesc |
168 // instead of the beginning. |
168 // instead of the beginning. |
169 PcDesc* pc_desc = nm->pc_desc_near(fr->pc() + 1); |
169 PcDesc* pc_desc = nm->pc_desc_near(fr->pc() + 1); |
297 frame* fr, |
297 frame* fr, |
298 frame* initial_frame_p, |
298 frame* initial_frame_p, |
299 Method** method_p, |
299 Method** method_p, |
300 int* bci_p) { |
300 int* bci_p) { |
301 |
301 |
302 // It is possible that for a frame containing an nmethod |
302 // It is possible that for a frame containing a compiled method |
303 // we can capture the method but no bci. If we get no |
303 // we can capture the method but no bci. If we get no |
304 // bci the frame isn't walkable but the method is usable. |
304 // bci the frame isn't walkable but the method is usable. |
305 // Therefore we init the returned Method* to NULL so the |
305 // Therefore we init the returned Method* to NULL so the |
306 // caller can make the distinction. |
306 // caller can make the distinction. |
307 |
307 |
358 |
358 |
359 // Hopefully we got some data |
359 // Hopefully we got some data |
360 return false; |
360 return false; |
361 } |
361 } |
362 |
362 |
363 if (candidate.cb()->is_nmethod()) { |
363 if (candidate.cb()->is_compiled()) { |
364 |
364 |
365 nmethod* nm = (nmethod*) candidate.cb(); |
365 CompiledMethod* nm = candidate.cb()->as_compiled_method(); |
366 *method_p = nm->method(); |
366 *method_p = nm->method(); |
367 |
367 |
368 // If the frame is not decipherable, then the value of -1 |
368 // If the frame is not decipherable, then the value of -1 |
369 // for the BCI is used to signal that no BCI is available. |
369 // for the BCI is used to signal that no BCI is available. |
370 // Furthermore, the method returns false in this case. |
370 // Furthermore, the method returns false in this case. |