1212 // See bug 6333838 for more details.
1213 // The "ASSERT" here is to verify this method generates the exactly same stack
1214 // trace as utilizing vframe.
1215 #ifdef ASSERT
1216 vframeStream st(thread);
1217 methodHandle st_method(THREAD, st.method());
1218 #endif
1219 int total_count = 0;
1220 RegisterMap map(thread, false);
1221 int decode_offset = 0;
1222 nmethod* nm = NULL;
1223 bool skip_fillInStackTrace_check = false;
1224 bool skip_throwableInit_check = false;
1225
1226 for (frame fr = thread->last_frame(); max_depth != total_count;) {
1227 methodOop method = NULL;
1228 int bci = 0;
1229
1230 // Compiled java method case.
1231 if (decode_offset != 0) {
1232 DebugInfoReadStream stream(nm, decode_offset);
1233 decode_offset = stream.read_int();
1234 method = (methodOop)nm->oop_at(stream.read_int());
1235 bci = stream.read_bci();
1236 } else {
1237 if (fr.is_first_frame()) break;
1238 address pc = fr.pc();
1239 if (fr.is_interpreted_frame()) {
1240 intptr_t bcx = fr.interpreter_frame_bcx();
1241 method = fr.interpreter_frame_method();
1242 bci = fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx);
1243 fr = fr.sender(&map);
1244 } else {
1245 CodeBlob* cb = fr.cb();
1246 // HMMM QQQ might be nice to have frame return nm as NULL if cb is non-NULL
1247 // but non nmethod
1248 fr = fr.sender(&map);
1249 if (cb == NULL || !cb->is_nmethod()) {
1250 continue;
1251 }
1252 nm = (nmethod*)cb;
1253 if (nm->method()->is_native()) {
1254 method = nm->method();
1255 bci = 0;
|
1212 // See bug 6333838 for more details.
1213 // The "ASSERT" here is to verify this method generates the exactly same stack
1214 // trace as utilizing vframe.
1215 #ifdef ASSERT
1216 vframeStream st(thread);
1217 methodHandle st_method(THREAD, st.method());
1218 #endif
1219 int total_count = 0;
1220 RegisterMap map(thread, false);
1221 int decode_offset = 0;
1222 nmethod* nm = NULL;
1223 bool skip_fillInStackTrace_check = false;
1224 bool skip_throwableInit_check = false;
1225
1226 for (frame fr = thread->last_frame(); max_depth != total_count;) {
1227 methodOop method = NULL;
1228 int bci = 0;
1229
1230 // Compiled java method case.
1231 if (decode_offset != 0) {
1232 bool dummy_reexecute = false;
1233 DebugInfoReadStream stream(nm, decode_offset);
1234 decode_offset = stream.read_int();
1235 method = (methodOop)nm->oop_at(stream.read_int());
1236 //fill_in_stack_trace does not need the reexecute information which is designed
1237 //for the deopt to reexecute
1238 bci = stream.read_bci_and_reexecute(dummy_reexecute);
1239 } else {
1240 if (fr.is_first_frame()) break;
1241 address pc = fr.pc();
1242 if (fr.is_interpreted_frame()) {
1243 intptr_t bcx = fr.interpreter_frame_bcx();
1244 method = fr.interpreter_frame_method();
1245 bci = fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx);
1246 fr = fr.sender(&map);
1247 } else {
1248 CodeBlob* cb = fr.cb();
1249 // HMMM QQQ might be nice to have frame return nm as NULL if cb is non-NULL
1250 // but non nmethod
1251 fr = fr.sender(&map);
1252 if (cb == NULL || !cb->is_nmethod()) {
1253 continue;
1254 }
1255 nm = (nmethod*)cb;
1256 if (nm->method()->is_native()) {
1257 method = nm->method();
1258 bci = 0;
|