Cleaning metadata inside metaspaces from the ClassLoaderData::_deallocate list requires a MetadataOnStackMark walk in a safepoint. This is currently done during class unloading. Move this to a safepoint cleanup phase so that class unloading does not require a safepoint (but this still does and always will).
The metaspace cleaning is for redefinition (scratch classes and old metadata attached to scratch classes), already created metadata for classes that have failed loading, constant pools extended due to default method processing, and methods for jsr rewrites.
The metaspace cleaning is for redefinition (scratch classes and old metadata attached to scratch classes), already created metadata for classes that have failed loading, constant pools extended due to default method processing, and methods for jsr rewrites.
- relates to
-
JDK-8209378 Fix Minimal VM after JDK-8208677 Move inner metaspace cleaning out of class unloading
- Resolved
-
JDK-8220718 Missing ResourceMark in nmethod::metadata_do
- Resolved
-
JDK-8252043 Move inner class metaspace cleaning out of safepoint cleanup tasks
- Resolved
-
JDK-8209889 RedefineStress tests crash
- Resolved