Questions on concurrent class unloading

Zhengyu Gu zgu at
Mon Apr 8 15:27:26 UTC 2019


I am studying concurrent class unloading in ZGC, it looks to me that 
nothing gets unlinked (ZNMethod::unlink())and purged (ZNMethod::purge()).

Inside ZNMethodUnlinkClosure::do_nmethod() [1]

It appears that nm->is_unloading() can never be true. Otherwise, 
assertion should fail inside nm->flush_dependencies(false), cause 
neither Universe::heap()->is_gc_active() (true for STW GC) nor 
is_ConcurrentGC_thread() is true.

Similar with ZNMethodPurgeClosure [2] , nm->make_unloaded() has similar 

What did I miss?





More information about the zgc-dev mailing list