< prev index next >

src/hotspot/share/gc/shared/gcBehaviours.cpp

Print this page

        

@@ -21,11 +21,11 @@
  * questions.
  *
  */
 
 #include "precompiled.hpp"
-#include "code/compiledMethod.hpp"
+#include "code/compiledMethod.inline.hpp"
 #include "code/nmethod.hpp"
 #include "gc/shared/gcBehaviours.hpp"
 
 IsUnloadingBehaviour* IsUnloadingBehaviour::_current = NULL;
 

@@ -61,10 +61,14 @@
   }
 };
 
 bool ClosureIsUnloadingBehaviour::is_unloading(CompiledMethod* cm) const {
   if (cm->is_nmethod()) {
+    if (cm->as_nmethod()->is_on_continuation_stack()) {
+      return false; // TODO eosterlund: Maybe the right fix is to return true, but instead of making it make_unloaded() make it make_not_entrant() instead. Or something like that.
+    }
+
     IsCompiledMethodUnloadingOopClosure cl(_cl);
     static_cast<nmethod*>(cm)->oops_do(&cl, true /* allow_dead */);
     return cl.is_unloading();
   } else {
     return false;
< prev index next >