[jdk17] RFR: 8268524: nmethod::post_compiled_method_load_event racingly called on zombie
Coleen Phillimore
coleenp at openjdk.java.net
Tue Jun 22 13:08:41 UTC 2021
On Tue, 22 Jun 2021 13:02:50 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> src/hotspot/share/code/nmethod.cpp line 1611:
>>
>>> 1609: return;
>>> 1610: }
>>> 1611: }
>>
>> Can't we change state from alive -> not_entrant here? Should this have a mark_as_seen_on_stack somewhere?
>
> not_entrant() is also implicitly is_alive(). That's why we need to check if they are not_entrant() in addition to is_alive(), to see if we are in a scenario where after we release the locks, it may racingly flip to zombie. That only happens for not_entrant nmethods, and we filter out the ones that can happen to by checking can_convert_to_zombie() on those.
Oh duh, yes, we don't have to mark them as seen if they can be converted to zombie here.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/107
More information about the hotspot-compiler-dev
mailing list