< prev index next >
src/share/vm/gc/serial/genMarkSweep.cpp
Print this page
*** 38,47 ****
--- 38,48 ----
#include "gc/shared/genCollectedHeap.hpp"
#include "gc/shared/genOopClosures.inline.hpp"
#include "gc/shared/modRefBarrierSet.hpp"
#include "gc/shared/referencePolicy.hpp"
#include "gc/shared/space.hpp"
+ #include "gc/shared/strongRootsScope.hpp"
#include "oops/instanceRefKlass.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/fprofiler.hpp"
#include "runtime/handles.inline.hpp"
*** 198,215 ****
follow_root_closure.set_orig_generation(gch->old_gen());
// Need new claim bits before marking starts.
ClassLoaderDataGraph::clear_claimed_marks();
! gch->gen_process_roots(level,
false, // Younger gens are not roots.
- true, // activate StrongRootsScope
GenCollectedHeap::SO_None,
GenCollectedHeap::StrongRootsOnly,
&follow_root_closure,
&follow_root_closure,
&follow_cld_closure);
// Process reference objects found during marking
{
ref_processor()->setup_policy(clear_all_softrefs);
const ReferenceProcessorStats& stats =
--- 199,220 ----
follow_root_closure.set_orig_generation(gch->old_gen());
// Need new claim bits before marking starts.
ClassLoaderDataGraph::clear_claimed_marks();
! {
! StrongRootsScope srs(1);
!
! gch->gen_process_roots(&srs,
! level,
false, // Younger gens are not roots.
GenCollectedHeap::SO_None,
GenCollectedHeap::StrongRootsOnly,
&follow_root_closure,
&follow_root_closure,
&follow_cld_closure);
+ }
// Process reference objects found during marking
{
ref_processor()->setup_policy(clear_all_softrefs);
const ReferenceProcessorStats& stats =
*** 282,299 ****
// as the Universe has not been created when the static constructors
// are run.
assert(level == 1, "We don't use mark-sweep on young generations.");
adjust_pointer_closure.set_orig_generation(gch->old_gen());
! gch->gen_process_roots(level,
false, // Younger gens are not roots.
- true, // activate StrongRootsScope
GenCollectedHeap::SO_AllCodeCache,
GenCollectedHeap::StrongAndWeakRoots,
&adjust_pointer_closure,
&adjust_pointer_closure,
&adjust_cld_closure);
gch->gen_process_weak_roots(&adjust_pointer_closure);
adjust_marks();
GenAdjustPointersClosure blk;
--- 287,308 ----
// as the Universe has not been created when the static constructors
// are run.
assert(level == 1, "We don't use mark-sweep on young generations.");
adjust_pointer_closure.set_orig_generation(gch->old_gen());
! {
! StrongRootsScope srs(1);
!
! gch->gen_process_roots(&srs,
! level,
false, // Younger gens are not roots.
GenCollectedHeap::SO_AllCodeCache,
GenCollectedHeap::StrongAndWeakRoots,
&adjust_pointer_closure,
&adjust_pointer_closure,
&adjust_cld_closure);
+ }
gch->gen_process_weak_roots(&adjust_pointer_closure);
adjust_marks();
GenAdjustPointersClosure blk;
< prev index next >