src/share/vm/gc_implementation/g1/concurrentMark.cpp
Print this page
*** 2161,2171 ****
--- 2161,2173 ----
// We need to make this be a "collection" so any collection pause that
// races with it goes around and waits for completeCleanup to finish.
g1h->increment_total_collections();
// Clean out dead classes and update Metaspace sizes.
+ if (G1ClassUnloadingEnabled) {
ClassLoaderDataGraph::purge();
+ }
MetaspaceGC::compute_new_size();
// We reclaimed old regions so we should calculate the sizes to make
// sure we update the old gen/space data.
g1h->g1mm()->update_sizes();
*** 2589,2601 ****
}
assert(_markStack.isEmpty(), "Marking should have completed");
// Unload Klasses, String, Symbols, Code Cache, etc.
!
G1RemarkGCTraceTime trace("Unloading", G1Log::finer());
bool purged_classes;
{
G1RemarkGCTraceTime trace("System Dictionary Unloading", G1Log::finest());
purged_classes = SystemDictionary::do_unloading(&g1_is_alive);
--- 2591,2604 ----
}
assert(_markStack.isEmpty(), "Marking should have completed");
// Unload Klasses, String, Symbols, Code Cache, etc.
! {
G1RemarkGCTraceTime trace("Unloading", G1Log::finer());
+ if (G1ClassUnloadingEnabled) {
bool purged_classes;
{
G1RemarkGCTraceTime trace("System Dictionary Unloading", G1Log::finest());
purged_classes = SystemDictionary::do_unloading(&g1_is_alive);
*** 2603,2617 ****
--- 2606,2622 ----
{
G1RemarkGCTraceTime trace("Parallel Unloading", G1Log::finest());
weakRefsWorkParallelPart(&g1_is_alive, purged_classes);
}
+ }
if (G1StringDedup::is_enabled()) {
G1RemarkGCTraceTime trace("String Deduplication Unlink", G1Log::finest());
G1StringDedup::unlink(&g1_is_alive);
}
+ }
}
void ConcurrentMark::swapMarkBitMaps() {
CMBitMapRO* temp = _prevMarkBitMap;
_prevMarkBitMap = (CMBitMapRO*)_nextMarkBitMap;