1.1 --- a/src/share/vm/runtime/deoptimization.cpp Wed Sep 15 20:25:37 2010 -0700 1.2 +++ b/src/share/vm/runtime/deoptimization.cpp Tue Sep 21 13:38:35 2010 -0700 1.3 @@ -124,6 +124,9 @@ 1.4 RegisterMap dummy_map(thread, false); 1.5 // Now get the deoptee with a valid map 1.6 frame deoptee = stub_frame.sender(&map); 1.7 + // Set the deoptee nmethod 1.8 + assert(thread->deopt_nmethod() == NULL, "Pending deopt!"); 1.9 + thread->set_deopt_nmethod(deoptee.cb()->as_nmethod_or_null()); 1.10 1.11 // Create a growable array of VFrames where each VFrame represents an inlined 1.12 // Java frame. This storage is allocated with the usual system arena. 1.13 @@ -445,6 +448,7 @@ 1.14 1.15 delete thread->deopt_mark(); 1.16 thread->set_deopt_mark(NULL); 1.17 + thread->set_deopt_nmethod(NULL); 1.18 1.19 1.20 if (JvmtiExport::can_pop_frame()) {