hotspot/src/share/vm/code/nmethod.hpp
changeset 22223 82e95c562133
parent 20290 2127dc70bce9
child 22506 0759c126204d
equal deleted inserted replaced
22222:45a293a4b895 22223:82e95c562133
   182 
   182 
   183 #ifdef ASSERT
   183 #ifdef ASSERT
   184   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
   184   bool _oops_are_stale;  // indicates that it's no longer safe to access oops section
   185 #endif
   185 #endif
   186 
   186 
   187   enum { alive        = 0,
   187   enum { in_use       = 0,   // executable nmethod
   188          not_entrant  = 1, // uncommon trap has happened but activations may still exist
   188          not_entrant  = 1,   // marked for deoptimization but activations may still exist,
   189          zombie       = 2,
   189                              // will be transformed to zombie when all activations are gone
   190          unloaded     = 3 };
   190          zombie       = 2,   // no activations exist, nmethod is ready for purge
   191 
   191          unloaded     = 3 }; // there should be no activations, should not be called,
       
   192                              // will be transformed to zombie immediately
   192 
   193 
   193   jbyte _scavenge_root_state;
   194   jbyte _scavenge_root_state;
   194 
   195 
   195   // Nmethod Flushing lock. If non-zero, then the nmethod is not removed
   196   // Nmethod Flushing lock. If non-zero, then the nmethod is not removed
   196   // and is not made into a zombie. However, once the nmethod is made into
   197   // and is not made into a zombie. However, once the nmethod is made into
   405   // entry points
   406   // entry points
   406   address entry_point() const                     { return _entry_point;             } // normal entry point
   407   address entry_point() const                     { return _entry_point;             } // normal entry point
   407   address verified_entry_point() const            { return _verified_entry_point;    } // if klass is correct
   408   address verified_entry_point() const            { return _verified_entry_point;    } // if klass is correct
   408 
   409 
   409   // flag accessing and manipulation
   410   // flag accessing and manipulation
   410   bool  is_in_use() const                         { return _state == alive; }
   411   bool  is_in_use() const                         { return _state == in_use; }
   411   bool  is_alive() const                          { return _state == alive || _state == not_entrant; }
   412   bool  is_alive() const                          { return _state == in_use || _state == not_entrant; }
   412   bool  is_not_entrant() const                    { return _state == not_entrant; }
   413   bool  is_not_entrant() const                    { return _state == not_entrant; }
   413   bool  is_zombie() const                         { return _state == zombie; }
   414   bool  is_zombie() const                         { return _state == zombie; }
   414   bool  is_unloaded() const                       { return _state == unloaded;   }
   415   bool  is_unloaded() const                       { return _state == unloaded;   }
   415 
   416 
   416   // Make the nmethod non entrant. The nmethod will continue to be
   417   // Make the nmethod non entrant. The nmethod will continue to be