Duplicate :
|
|
Relates :
|
There's code that tests for JVMTI and sets the unloading_occurred flag in nmethod.cpp. This is code left over from Permgen when the old, not running methods were oops in the nmethod and needed to be cleaned out. Redefinition was fixed eagerly clean old methods, rather than wait for GC. This flag setting and the commentary around it are no longer valid. The nmethod IC , weak_klass links and dependency Klass cleaning only needs to be done if a klass is unloaded.