< prev index next > src/hotspot/share/gc/serial/genMarkSweep.cpp
Print this page
#include "gc/shared/genCollectedHeap.hpp"
#include "gc/shared/generation.hpp"
#include "gc/shared/modRefBarrierSet.hpp"
#include "gc/shared/referencePolicy.hpp"
#include "gc/shared/referenceProcessorPhaseTimes.hpp"
+ #include "gc/shared/slidingForwarding.hpp"
#include "gc/shared/space.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "gc/shared/weakProcessor.hpp"
#include "memory/universe.hpp"
#include "oops/instanceRefKlass.hpp"
allocate_stacks();
mark_sweep_phase1(clear_all_softrefs);
+ SlidingForwarding::begin();
+
mark_sweep_phase2();
// Don't add any more derived pointers during phase3
#if COMPILER2_OR_JVMCI
assert(DerivedPointerTable::is_active(), "Sanity");
// Set saved marks for allocation profiler (and other things? -- dld)
// (Should this be in general part?)
gch->save_marks();
+ SlidingForwarding::end();
+
deallocate_stacks();
MarkSweep::_string_dedup_requests->flush();
bool is_young_gen_empty = (gch->young_gen()->used() == 0);
// Adjust the pointers to reflect the new locations
GCTraceTime(Info, gc, phases) tm("Phase 3: Adjust pointers", gc_timer());
ClassLoaderDataGraph::verify_claimed_marks_cleared(ClassLoaderData::_claim_stw_fullgc_adjust);
! CodeBlobToOopClosure code_closure(&adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
! gch->process_roots(GenCollectedHeap::SO_AllCodeCache,
! &adjust_pointer_closure,
! &adjust_cld_closure,
! &adjust_cld_closure,
! &code_closure);
!
! gch->gen_process_weak_roots(&adjust_pointer_closure);
!
adjust_marks();
GenAdjustPointersClosure blk;
gch->generation_iterate(&blk, true);
}
// Adjust the pointers to reflect the new locations
GCTraceTime(Info, gc, phases) tm("Phase 3: Adjust pointers", gc_timer());
ClassLoaderDataGraph::verify_claimed_marks_cleared(ClassLoaderData::_claim_stw_fullgc_adjust);
! if (UseAltGCForwarding) {
! AdjustPointerClosure<true> adjust_pointer_closure;
! CLDToOopClosure adjust_cld_closure(&adjust_pointer_closure, ClassLoaderData::_claim_stw_fullgc_adjust);
! CodeBlobToOopClosure code_closure(&adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
! gch->process_roots(GenCollectedHeap::SO_AllCodeCache,
! &adjust_pointer_closure,
! &adjust_cld_closure,
! &adjust_cld_closure,
! &code_closure);
+ gch->gen_process_weak_roots(&adjust_pointer_closure);
+ } else {
+ AdjustPointerClosure<false> adjust_pointer_closure;
+ CLDToOopClosure adjust_cld_closure(&adjust_pointer_closure, ClassLoaderData::_claim_stw_fullgc_adjust);
+ CodeBlobToOopClosure code_closure(&adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
+ gch->process_roots(GenCollectedHeap::SO_AllCodeCache,
+ &adjust_pointer_closure,
+ &adjust_cld_closure,
+ &adjust_cld_closure,
+ &code_closure);
+ gch->gen_process_weak_roots(&adjust_pointer_closure);
+ }
adjust_marks();
GenAdjustPointersClosure blk;
gch->generation_iterate(&blk, true);
}
< prev index next >