< prev index next >
src/share/vm/gc/serial/genMarkSweep.cpp
Print this page
rev 11983 : 8166276: Refactor gen_process_roots to allow simpler fix for 8165949
Reviewed-by:
Contributed-by: jesper.wilhelmsson@oracle.com
rev 11985 : 8165949: Serial and ConcMarkSweep do not unload strings when class unloading is disabled
Reviewed-by:
@@ -194,14 +194,15 @@
ClassLoaderDataGraph::clear_claimed_marks();
{
StrongRootsScope srs(1);
- gch->old_process_roots(&srs,
- false, // Younger gens are not roots.
+ gch->full_process_roots(&srs,
+ ClassUnloading, // only strong roots if ClassUnloading
+ // is enabled
GenCollectedHeap::SO_None,
- ClassUnloading,
+ false, // not the adjust phase
&follow_root_closure,
&follow_cld_closure);
}
// Process reference objects found during marking
@@ -291,14 +292,14 @@
adjust_pointer_closure.set_orig_generation(gch->old_gen());
{
StrongRootsScope srs(1);
- gch->old_process_roots(&srs,
- false, // Younger gens are not roots.
+ gch->full_process_roots(&srs,
+ false, // all roots
GenCollectedHeap::SO_AllCodeCache,
- false,
+ true, // this is the adjust phase
&adjust_pointer_closure,
&adjust_cld_closure);
}
gch->gen_process_weak_roots(&adjust_pointer_closure);
< prev index next >