1329 guarantee( high_mark > current , "Current BasicObjectLock* higher than high_mark"); |
1328 guarantee( high_mark > current , "Current BasicObjectLock* higher than high_mark"); |
1330 |
1329 |
1331 guarantee((current - low_mark) % monitor_size == 0 , "Misaligned bottom of BasicObjectLock*"); |
1330 guarantee((current - low_mark) % monitor_size == 0 , "Misaligned bottom of BasicObjectLock*"); |
1332 guarantee( current >= low_mark , "Current BasicObjectLock* below than low_mark"); |
1331 guarantee( current >= low_mark , "Current BasicObjectLock* below than low_mark"); |
1333 } |
1332 } |
1334 |
1333 #endif |
1335 |
1334 |
|
1335 #ifndef PRODUCT |
1336 void frame::describe(FrameValues& values, int frame_no) { |
1336 void frame::describe(FrameValues& values, int frame_no) { |
|
1337 // boundaries: sp and the 'real' frame pointer |
|
1338 values.describe(-1, sp(), err_msg("sp for #%d", frame_no), 1); |
|
1339 intptr_t* frame_pointer = real_fp(); // Note: may differ from fp() |
|
1340 |
|
1341 // print frame info at the highest boundary |
|
1342 intptr_t* info_address = MAX2(sp(), frame_pointer); |
|
1343 |
|
1344 if (info_address != frame_pointer) { |
|
1345 // print frame_pointer explicitly if not marked by the frame info |
|
1346 values.describe(-1, frame_pointer, err_msg("frame pointer for #%d", frame_no), 1); |
|
1347 } |
|
1348 |
1337 if (is_entry_frame() || is_compiled_frame() || is_interpreted_frame() || is_native_frame()) { |
1349 if (is_entry_frame() || is_compiled_frame() || is_interpreted_frame() || is_native_frame()) { |
1338 // Label values common to most frames |
1350 // Label values common to most frames |
1339 values.describe(-1, unextended_sp(), err_msg("unextended_sp for #%d", frame_no)); |
1351 values.describe(-1, unextended_sp(), err_msg("unextended_sp for #%d", frame_no)); |
1340 values.describe(-1, sp(), err_msg("sp for #%d", frame_no)); |
1352 } |
1341 if (is_compiled_frame()) { |
1353 |
1342 values.describe(-1, sp() + _cb->frame_size(), err_msg("computed fp for #%d", frame_no)); |
|
1343 } else { |
|
1344 values.describe(-1, fp(), err_msg("fp for #%d", frame_no)); |
|
1345 } |
|
1346 } |
|
1347 if (is_interpreted_frame()) { |
1354 if (is_interpreted_frame()) { |
1348 methodOop m = interpreter_frame_method(); |
1355 methodOop m = interpreter_frame_method(); |
1349 int bci = interpreter_frame_bci(); |
1356 int bci = interpreter_frame_bci(); |
1350 |
1357 |
1351 // Label the method and current bci |
1358 // Label the method and current bci |
1352 values.describe(-1, MAX2(sp(), fp()), |
1359 values.describe(-1, info_address, |
1353 FormatBuffer<1024>("#%d method %s @ %d", frame_no, m->name_and_sig_as_C_string(), bci), 2); |
1360 FormatBuffer<1024>("#%d method %s @ %d", frame_no, m->name_and_sig_as_C_string(), bci), 2); |
1354 values.describe(-1, MAX2(sp(), fp()), |
1361 values.describe(-1, info_address, |
1355 err_msg("- %d locals %d max stack", m->max_locals(), m->max_stack()), 1); |
1362 err_msg("- %d locals %d max stack", m->max_locals(), m->max_stack()), 1); |
1356 if (m->max_locals() > 0) { |
1363 if (m->max_locals() > 0) { |
1357 intptr_t* l0 = interpreter_frame_local_at(0); |
1364 intptr_t* l0 = interpreter_frame_local_at(0); |
1358 intptr_t* ln = interpreter_frame_local_at(m->max_locals() - 1); |
1365 intptr_t* ln = interpreter_frame_local_at(m->max_locals() - 1); |
1359 values.describe(-1, MAX2(l0, ln), err_msg("locals for #%d", frame_no), 1); |
1366 values.describe(-1, MAX2(l0, ln), err_msg("locals for #%d", frame_no), 1); |
1381 values.describe(frame_no, (intptr_t*)interpreter_frame_monitor_begin(), "monitors begin"); |
1388 values.describe(frame_no, (intptr_t*)interpreter_frame_monitor_begin(), "monitors begin"); |
1382 values.describe(frame_no, (intptr_t*)interpreter_frame_monitor_end(), "monitors end"); |
1389 values.describe(frame_no, (intptr_t*)interpreter_frame_monitor_end(), "monitors end"); |
1383 } |
1390 } |
1384 } else if (is_entry_frame()) { |
1391 } else if (is_entry_frame()) { |
1385 // For now just label the frame |
1392 // For now just label the frame |
1386 values.describe(-1, MAX2(sp(), fp()), err_msg("#%d entry frame", frame_no), 2); |
1393 values.describe(-1, info_address, err_msg("#%d entry frame", frame_no), 2); |
1387 } else if (is_compiled_frame()) { |
1394 } else if (is_compiled_frame()) { |
1388 // For now just label the frame |
1395 // For now just label the frame |
1389 nmethod* nm = cb()->as_nmethod_or_null(); |
1396 nmethod* nm = cb()->as_nmethod_or_null(); |
1390 values.describe(-1, MAX2(sp(), fp()), |
1397 values.describe(-1, info_address, |
1391 FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for method %s%s", frame_no, |
1398 FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for method %s%s", frame_no, |
1392 nm, nm->method()->name_and_sig_as_C_string(), |
1399 nm, nm->method()->name_and_sig_as_C_string(), |
1393 is_deoptimized_frame() ? " (deoptimized" : ""), 2); |
1400 (_deopt_state == is_deoptimized) ? |
|
1401 " (deoptimized)" : |
|
1402 ((_deopt_state == unknown) ? " (state unknown)" : "")), |
|
1403 2); |
1394 } else if (is_native_frame()) { |
1404 } else if (is_native_frame()) { |
1395 // For now just label the frame |
1405 // For now just label the frame |
1396 nmethod* nm = cb()->as_nmethod_or_null(); |
1406 nmethod* nm = cb()->as_nmethod_or_null(); |
1397 values.describe(-1, MAX2(sp(), fp()), |
1407 values.describe(-1, info_address, |
1398 FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for native method %s", frame_no, |
1408 FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for native method %s", frame_no, |
1399 nm, nm->method()->name_and_sig_as_C_string()), 2); |
1409 nm, nm->method()->name_and_sig_as_C_string()), 2); |
1400 } |
1410 } else if (is_ricochet_frame()) { |
|
1411 values.describe(-1, info_address, err_msg("#%d ricochet frame", frame_no), 2); |
|
1412 } else { |
|
1413 // provide default info if not handled before |
|
1414 char *info = (char *) "special frame"; |
|
1415 if ((_cb != NULL) && |
|
1416 (_cb->name() != NULL)) { |
|
1417 info = (char *)_cb->name(); |
|
1418 } |
|
1419 values.describe(-1, info_address, err_msg("#%d <%s>", frame_no, info), 2); |
|
1420 } |
|
1421 |
|
1422 // platform dependent additional data |
1401 describe_pd(values, frame_no); |
1423 describe_pd(values, frame_no); |
1402 } |
1424 } |
1403 |
1425 |
1404 #endif |
1426 #endif |
1405 |
1427 |