hotspot/src/share/vm/runtime/deoptimization.cpp
changeset 6740 2bc601284215
parent 6453 970dc585ab63
child 7106 867c9d296c6b
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Sep 15 20:25:37 2010 -0700
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Tue Sep 21 13:38:35 2010 -0700
@@ -124,6 +124,9 @@
   RegisterMap dummy_map(thread, false);
   // Now get the deoptee with a valid map
   frame deoptee = stub_frame.sender(&map);
+  // Set the deoptee nmethod
+  assert(thread->deopt_nmethod() == NULL, "Pending deopt!");
+  thread->set_deopt_nmethod(deoptee.cb()->as_nmethod_or_null());
 
   // Create a growable array of VFrames where each VFrame represents an inlined
   // Java frame.  This storage is allocated with the usual system arena.
@@ -445,6 +448,7 @@
 
   delete thread->deopt_mark();
   thread->set_deopt_mark(NULL);
+  thread->set_deopt_nmethod(NULL);
 
 
   if (JvmtiExport::can_pop_frame()) {