1622 int decode_offset = 0; 1623 nmethod* nm = NULL; 1624 bool skip_fillInStackTrace_check = false; 1625 bool skip_throwableInit_check = false; 1626 bool skip_hidden = !ShowHiddenFrames; 1627 1628 for (frame fr = thread->last_frame(); max_depth != total_count;) { 1629 Method* method = NULL; 1630 int bci = 0; 1631 1632 // Compiled java method case. 1633 if (decode_offset != 0) { 1634 DebugInfoReadStream stream(nm, decode_offset); 1635 decode_offset = stream.read_int(); 1636 method = (Method*)nm->metadata_at(stream.read_int()); 1637 bci = stream.read_bci(); 1638 } else { 1639 if (fr.is_first_frame()) break; 1640 address pc = fr.pc(); 1641 if (fr.is_interpreted_frame()) { 1642 intptr_t bcx = fr.interpreter_frame_bcx(); 1643 method = fr.interpreter_frame_method(); 1644 bci = fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx); 1645 fr = fr.sender(&map); 1646 } else { 1647 CodeBlob* cb = fr.cb(); 1648 // HMMM QQQ might be nice to have frame return nm as NULL if cb is non-NULL 1649 // but non nmethod 1650 fr = fr.sender(&map); 1651 if (cb == NULL || !cb->is_nmethod()) { 1652 continue; 1653 } 1654 nm = (nmethod*)cb; 1655 if (nm->method()->is_native()) { 1656 method = nm->method(); 1657 bci = 0; 1658 } else { 1659 PcDesc* pd = nm->pc_desc_at(pc); 1660 decode_offset = pd->scope_decode_offset(); 1661 // if decode_offset is not equal to 0, it will execute the 1662 // "compiled java method case" at the beginning of the loop. 1663 continue; 1664 } | 1622 int decode_offset = 0; 1623 nmethod* nm = NULL; 1624 bool skip_fillInStackTrace_check = false; 1625 bool skip_throwableInit_check = false; 1626 bool skip_hidden = !ShowHiddenFrames; 1627 1628 for (frame fr = thread->last_frame(); max_depth != total_count;) { 1629 Method* method = NULL; 1630 int bci = 0; 1631 1632 // Compiled java method case. 1633 if (decode_offset != 0) { 1634 DebugInfoReadStream stream(nm, decode_offset); 1635 decode_offset = stream.read_int(); 1636 method = (Method*)nm->metadata_at(stream.read_int()); 1637 bci = stream.read_bci(); 1638 } else { 1639 if (fr.is_first_frame()) break; 1640 address pc = fr.pc(); 1641 if (fr.is_interpreted_frame()) { 1642 address bcp = fr.interpreter_frame_bcp(); 1643 method = fr.interpreter_frame_method(); 1644 bci = method->bci_from(bcp); 1645 fr = fr.sender(&map); 1646 } else { 1647 CodeBlob* cb = fr.cb(); 1648 // HMMM QQQ might be nice to have frame return nm as NULL if cb is non-NULL 1649 // but non nmethod 1650 fr = fr.sender(&map); 1651 if (cb == NULL || !cb->is_nmethod()) { 1652 continue; 1653 } 1654 nm = (nmethod*)cb; 1655 if (nm->method()->is_native()) { 1656 method = nm->method(); 1657 bci = 0; 1658 } else { 1659 PcDesc* pd = nm->pc_desc_at(pc); 1660 decode_offset = pd->scope_decode_offset(); 1661 // if decode_offset is not equal to 0, it will execute the 1662 // "compiled java method case" at the beginning of the loop. 1663 continue; 1664 } |