8005602: NPG: classunloading does not happen while CMS GC with -XX:+CMSClassUnloadingEnabled is used

Call purge() on CLDG after sweep(), reorder purge() call in GenCollectedHeap

Reviewed-by: jmasa, stefank
This commit is contained in:
Mikael Gerdin 2013-03-14 10:54:44 +01:00
parent 79c091f287
commit a4a4c34e96
3 changed files with 11 additions and 8 deletions

View file

@ -554,6 +554,8 @@ void GenCollectedHeap::do_collection(bool full,
}
if (complete) {
// Delete metaspaces for unloaded class loaders and clean up loader_data graph
ClassLoaderDataGraph::purge();
// Resize the metaspace capacity after full collections
MetaspaceGC::compute_new_size();
update_full_collections_completed();
@ -564,11 +566,6 @@ void GenCollectedHeap::do_collection(bool full,
gc_epilogue(complete);
// Delete metaspaces for unloaded class loaders and clean up loader_data graph
if (complete) {
ClassLoaderDataGraph::purge();
}
if (must_restore_marks_for_biased_locking) {
BiasedLocking::restore_marks();
}