RFR (XS): 8023037 : Race between ciEnv::register_method and nmethod::make_not_entrant_or_zombie

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Tue Nov 5 11:00:13 PST 2013

>>> Does that mean StressNonEntrant is broken?
>> Good point. Yes, StressNonEntrant is also broken.
> Should we do something about it? remove it?
Yes. I'll remove it as part of this change. Thanks for catching that.

>>> Would another fix be to have the sweeper check that the method was made ready to execute before it attempts to make it not entrant?
>>> i.e. nmethod->method()->code() == nmethod
>> I don't see any reason why it shouldn't work as well. But it means that marking method as non-entrant is not reliable - doesn't necessarily perform state transition. I don't think we want that.
> I meant change NMethodSweeper::process_nmethod():
>        if (!nm->is_locked_by_vm() && !nm->is_osr_method() && !nm->is_native_method() && nm->method()->code() == nm) {

I was wrong about sweeper - invalidation comes as a result of class 
redefinition. So, if we want to filter out not-yet-registered nmethods, 
it should be done in nmethod::make_not_entrant_or_zombie.

Best regards,
Vladimir Ivanov

More information about the hotspot-compiler-dev mailing list