--- old/src/share/vm/interpreter/interpreterRuntime.cpp 2012-12-27 20:01:22.032608511 -0500 +++ new/src/share/vm/interpreter/interpreterRuntime.cpp 2012-12-27 20:01:20.769563370 -0500 @@ -427,7 +427,7 @@ // exception handler lookup KlassHandle h_klass(THREAD, h_exception->klass()); - handler_bci = h_method->fast_exception_handler_bci_for(h_klass, current_bci, THREAD); + handler_bci = methodOopDesc::fast_exception_handler_bci_for(h_method, h_klass, current_bci, THREAD); if (HAS_PENDING_EXCEPTION) { // We threw an exception while trying to find the exception handler. // Transfer the new exception to the exception handle which will --- old/src/share/vm/oops/methodOop.cpp 2012-12-27 20:01:27.138179072 -0500 +++ new/src/share/vm/oops/methodOop.cpp 2012-12-27 20:01:25.665671108 -0500 @@ -109,16 +109,16 @@ return buf; } -int methodOopDesc::fast_exception_handler_bci_for(KlassHandle ex_klass, int throw_bci, TRAPS) { +int methodOopDesc::fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS) { // exception table holds quadruple entries of the form (beg_bci, end_bci, handler_bci, klass_index) // access exception table - ExceptionTable table(this); + ExceptionTable table(mh()); int length = table.length(); // iterate through all entries sequentially - constantPoolHandle pool(THREAD, constants()); + constantPoolHandle pool(THREAD, mh->constants()); for (int i = 0; i < length; i ++) { //reacquire the table in case a GC happened - ExceptionTable table(this); + ExceptionTable table(mh()); int beg_bci = table.start_pc(i); int end_bci = table.end_pc(i); assert(beg_bci <= end_bci, "inconsistent exception table"); --- old/src/share/vm/oops/methodOop.hpp 2012-12-27 20:01:31.496747697 -0500 +++ new/src/share/vm/oops/methodOop.hpp 2012-12-27 20:01:30.313346559 -0500 @@ -306,7 +306,7 @@ // exception handler which caused the exception to be thrown, which // is needed for proper retries. See, for example, // InterpreterRuntime::exception_handler_for_exception. - int fast_exception_handler_bci_for(KlassHandle ex_klass, int throw_bci, TRAPS); + static int fast_exception_handler_bci_for(methodHandle mh, KlassHandle ex_klass, int throw_bci, TRAPS); // method data access methodDataOop method_data() const { --- old/src/share/vm/prims/jvmtiExport.cpp 2012-12-27 20:01:35.561525554 -0500 +++ new/src/share/vm/prims/jvmtiExport.cpp 2012-12-27 20:01:34.375770187 -0500 @@ -1305,15 +1305,17 @@ vframeStream st(thread); assert(!st.at_end(), "cannot be at end"); methodOop current_method = NULL; + methodHandle current_mh = methodHandle(thread, current_method); int current_bci = -1; do { current_method = st.method(); + current_mh = methodHandle(thread, current_method); current_bci = st.bci(); do { should_repeat = false; KlassHandle eh_klass(thread, exception_handle()->klass()); - current_bci = current_method->fast_exception_handler_bci_for( - eh_klass, current_bci, THREAD); + current_bci = methodOopDesc::fast_exception_handler_bci_for( + current_mh, eh_klass, current_bci, THREAD); if (HAS_PENDING_EXCEPTION) { exception_handle = KlassHandle(thread, PENDING_EXCEPTION); CLEAR_PENDING_EXCEPTION; @@ -1328,8 +1330,7 @@ catch_jmethodID = 0; current_bci = 0; } else { - catch_jmethodID = jem.to_jmethodID( - methodHandle(thread, current_method)); + catch_jmethodID = jem.to_jmethodID(current_mh); } JvmtiJavaThreadEventTransition jet(thread); --- old/src/share/vm/runtime/sharedRuntime.cpp 2012-12-27 20:01:39.696941594 -0500 +++ new/src/share/vm/runtime/sharedRuntime.cpp 2012-12-27 20:01:38.482204540 -0500 @@ -642,7 +642,7 @@ bool skip_scope_increment = false; // exception handler lookup KlassHandle ek (THREAD, exception->klass()); - handler_bci = sd->method()->fast_exception_handler_bci_for(ek, bci, THREAD); + handler_bci = methodOopDesc::fast_exception_handler_bci_for(sd->method(), ek, bci, THREAD); if (HAS_PENDING_EXCEPTION) { recursive_exception = true; // We threw an exception while trying to find the exception handler.