RFR: 8214302: Allow safely calling is_unloading() on zombie nmethods
vladimir.kozlov at oracle.com
Tue Nov 27 00:40:45 UTC 2018
Can you tell if there is any concurrency window where you check is_zombie and store new unloading state - can other
thread change nmethod to zombie?
I also noticed that CodeCache::unloading_cycle() is called twice in this code. Can we cache it in local?
On 11/26/18 7:30 AM, Erik Österlund wrote:
> It is currently not safe to call is_unloading on zombie nmethods, unless it has been observed to be alive. It should be
> supported to make the code less fragile. When encountering a !is_alive() nmethod that has not had its unloading epoch
> updated, and ask if it is_unloading(), the answer is always false. So by adding that, is_unloading() can always be
> safely called.
More information about the hotspot-compiler-dev