diff src/share/vm/code/nmethod.hpp @ 14212:22ae97935e05

8028107: Kitchensink crashed with EAV Summary: check the state of caller and callee nmethods and skip call site patching if any of them is not alive Reviewed-by: jrose, twisti
author kvn
date Fri, 06 Dec 2013 12:11:51 -0800
parents 510fbd28919c
children 02f27ecb4f3a 3aaa4b9966f6 606acabe7b5c
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.hpp	Mon Dec 09 10:03:39 2013 +0100
+++ b/src/share/vm/code/nmethod.hpp	Fri Dec 06 12:11:51 2013 -0800
@@ -184,11 +184,12 @@
   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
 #endif
 
-  enum { alive        = 0,
-         not_entrant  = 1, // uncommon trap has happened but activations may still exist
-         zombie       = 2,
-         unloaded     = 3 };
-
+  enum { in_use       = 0,   // executable nmethod
+         not_entrant  = 1,   // marked for deoptimization but activations may still exist,
+                             // will be transformed to zombie when all activations are gone
+         zombie       = 2,   // no activations exist, nmethod is ready for purge
+         unloaded     = 3 }; // there should be no activations, should not be called,
+                             // will be transformed to zombie immediately
 
   jbyte _scavenge_root_state;
 
@@ -407,8 +408,8 @@
   address verified_entry_point() const            { return _verified_entry_point;    } // if klass is correct
 
   // flag accessing and manipulation
-  bool  is_in_use() const                         { return _state == alive; }
-  bool  is_alive() const                          { return _state == alive || _state == not_entrant; }
+  bool  is_in_use() const                         { return _state == in_use; }
+  bool  is_alive() const                          { return _state == in_use || _state == not_entrant; }
   bool  is_not_entrant() const                    { return _state == not_entrant; }
   bool  is_zombie() const                         { return _state == zombie; }
   bool  is_unloaded() const                       { return _state == unloaded;   }