comparison src/share/vm/code/nmethod.cpp @ 1935:98dbef29f10b

Important fix for exception unwind method entry offset (regression introduced during update to latest OpenJDK). Hard to find bug => should add a regression test for wrong offsets.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Wed, 22 Dec 2010 19:47:39 +0100
parents 48bbaead8b6c
children 4853c5cad3aa
comparison
equal deleted inserted replaced
1934:b1f2e875300a 1935:98dbef29f10b
792 _consts_offset = content_offset() + code_buffer->total_offset_of(code_buffer->consts()); 792 _consts_offset = content_offset() + code_buffer->total_offset_of(code_buffer->consts());
793 _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs()); 793 _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs());
794 794
795 // Exception handler and deopt handler are in the stub section 795 // Exception handler and deopt handler are in the stub section
796 if (UseC1X) { 796 if (UseC1X) {
797 // c1x produces no stub section 797 // c1x produces no (!) stub section
798 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); 798 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions);
799 _deoptimize_offset = _stub_offset + offsets->value(CodeOffsets::Deopt); 799 _deoptimize_offset = code_offset() + offsets->value(CodeOffsets::Deopt);
800 if (has_method_handle_invokes()) { 800 if (has_method_handle_invokes()) {
801 _deoptimize_mh_offset = _stub_offset + offsets->value(CodeOffsets::DeoptMH); 801 _deoptimize_mh_offset = code_offset() + offsets->value(CodeOffsets::DeoptMH);
802 } else { 802 } else {
803 _deoptimize_mh_offset = -1; 803 _deoptimize_mh_offset = -1;
804 } 804 }
805 } else { 805 } else {
806 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions); 806 _exception_offset = _stub_offset + offsets->value(CodeOffsets::Exceptions);