comparison 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
comparison
equal deleted inserted replaced
14211:a2a3f08b96fa 14212:22ae97935e05
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