equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2003-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
128 int32_t instrs_end; |
128 int32_t instrs_end; |
129 int32_t deopt_beg; /* _deoptimize_offset */ |
129 int32_t deopt_beg; /* _deoptimize_offset */ |
130 int32_t scopes_data_beg; /* _scopes_data_offset */ |
130 int32_t scopes_data_beg; /* _scopes_data_offset */ |
131 int32_t scopes_data_end; |
131 int32_t scopes_data_end; |
132 int32_t oops_beg; /* _oops_offset */ |
132 int32_t oops_beg; /* _oops_offset */ |
133 int32_t oops_len; /* _oops_length */ |
133 int32_t oops_end; |
134 int32_t scopes_pcs_beg; /* _scopes_pcs_offset */ |
134 int32_t scopes_pcs_beg; /* _scopes_pcs_offset */ |
135 int32_t scopes_pcs_end; |
135 int32_t scopes_pcs_end; |
136 |
136 |
137 int vf_cnt; |
137 int vf_cnt; |
138 Vframe_t vframes[MAX_VFRAMES_CNT]; |
138 Vframe_t vframes[MAX_VFRAMES_CNT]; |
595 CHECK_FAIL(err); |
595 CHECK_FAIL(err); |
596 err = ps_pread(J->P, nm + OFFSET_nmethod_orig_pc_offset, &N->orig_pc_offset, SZ32); |
596 err = ps_pread(J->P, nm + OFFSET_nmethod_orig_pc_offset, &N->orig_pc_offset, SZ32); |
597 CHECK_FAIL(err); |
597 CHECK_FAIL(err); |
598 |
598 |
599 /* Oops */ |
599 /* Oops */ |
600 err = ps_pread(J->P, nm + OFFSET_CodeBlob_oops_offset, &N->oops_beg, SZ32); |
600 err = ps_pread(J->P, nm + OFFSET_nmethod_oops_offset, &N->oops_beg, SZ32); |
601 CHECK_FAIL(err); |
601 CHECK_FAIL(err); |
602 err = ps_pread(J->P, nm + OFFSET_CodeBlob_oops_length, &N->oops_len, SZ32); |
602 err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_data_offset, &N->oops_end, SZ32); |
603 CHECK_FAIL(err); |
603 CHECK_FAIL(err); |
604 |
604 |
605 /* scopes_pcs */ |
605 /* scopes_pcs */ |
606 err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32); |
606 err = ps_pread(J->P, nm + OFFSET_nmethod_scopes_pcs_offset, &N->scopes_pcs_beg, SZ32); |
607 CHECK_FAIL(err); |
607 CHECK_FAIL(err); |
622 N->deopt_beg); |
622 N->deopt_beg); |
623 |
623 |
624 fprintf(stderr, "\t nmethod_info: orig_pc_offset: %#x \n", |
624 fprintf(stderr, "\t nmethod_info: orig_pc_offset: %#x \n", |
625 N->orig_pc_offset); |
625 N->orig_pc_offset); |
626 |
626 |
627 fprintf(stderr, "\t nmethod_info: oops_beg: %#x, oops_len: %#x\n", |
627 fprintf(stderr, "\t nmethod_info: oops_beg: %#x, oops_end: %#x\n", |
628 N->oops_beg, N->oops_len); |
628 N->oops_beg, N->oops_end); |
629 |
629 |
630 fprintf(stderr, "\t nmethod_info: scopes_data_beg: %#x, scopes_data_end: %#x\n", |
630 fprintf(stderr, "\t nmethod_info: scopes_data_beg: %#x, scopes_data_end: %#x\n", |
631 N->scopes_data_beg, N->scopes_data_end); |
631 N->scopes_data_beg, N->scopes_data_end); |
632 |
632 |
633 fprintf(stderr, "\t nmethod_info: scopes_pcs_beg: %#x, scopes_pcs_end: %#x\n", |
633 fprintf(stderr, "\t nmethod_info: scopes_pcs_beg: %#x, scopes_pcs_end: %#x\n", |
957 } |
957 } |
958 |
958 |
959 err = scope_desc_at(N, decode_offset, vf); |
959 err = scope_desc_at(N, decode_offset, vf); |
960 CHECK_FAIL(err); |
960 CHECK_FAIL(err); |
961 |
961 |
962 if (vf->methodIdx > N->oops_len) { |
962 if (vf->methodIdx > ((N->oops_end - N->oops_beg) / POINTER_SIZE)) { |
963 fprintf(stderr, "\t scopeDesc_chain: (methodIdx > oops_len) !\n"); |
963 fprintf(stderr, "\t scopeDesc_chain: (methodIdx > oops length) !\n"); |
964 return -1; |
964 return -1; |
965 } |
965 } |
966 err = read_pointer(N->J, N->nm + N->oops_beg + (vf->methodIdx-1)*POINTER_SIZE, |
966 err = read_pointer(N->J, N->nm + N->oops_beg + (vf->methodIdx-1)*POINTER_SIZE, |
967 &vf->methodOop); |
967 &vf->methodOop); |
968 CHECK_FAIL(err); |
968 CHECK_FAIL(err); |