< prev index next >
src/share/vm/gc/g1/g1MarkSweep.cpp
Print this page
*** 119,129 ****
}
void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
bool clear_all_softrefs) {
// Recursively traverse all live objects and mark them
! GCTraceTime tm("phase 1", G1Log::fine() && Verbose, true, gc_timer(), gc_tracer()->gc_id());
G1CollectedHeap* g1h = G1CollectedHeap::heap();
// Need cleared claim bits for the roots processing
ClassLoaderDataGraph::clear_claimed_marks();
--- 119,129 ----
}
void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
bool clear_all_softrefs) {
// Recursively traverse all live objects and mark them
! GCTraceTime tm("phase 1", G1Log::fine() && Verbose, true, gc_timer());
G1CollectedHeap* g1h = G1CollectedHeap::heap();
// Need cleared claim bits for the roots processing
ClassLoaderDataGraph::clear_claimed_marks();
*** 144,155 ****
const ReferenceProcessorStats& stats =
rp->process_discovered_references(&GenMarkSweep::is_alive,
&GenMarkSweep::keep_alive,
&GenMarkSweep::follow_stack_closure,
NULL,
! gc_timer(),
! gc_tracer()->gc_id());
gc_tracer()->report_gc_reference_stats(stats);
// This is the point where the entire marking should have completed.
assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed");
--- 144,154 ----
const ReferenceProcessorStats& stats =
rp->process_discovered_references(&GenMarkSweep::is_alive,
&GenMarkSweep::keep_alive,
&GenMarkSweep::follow_stack_closure,
NULL,
! gc_timer());
gc_tracer()->report_gc_reference_stats(stats);
// This is the point where the entire marking should have completed.
assert(GenMarkSweep::_marking_stack.is_empty(), "Marking should have completed");
*** 198,208 ****
// It is not required that we traverse spaces in the same order in
// phase2, phase3 and phase4, but the ValidateMarkSweep live oops
// tracking expects us to do so. See comment under phase4.
! GCTraceTime tm("phase 2", G1Log::fine() && Verbose, true, gc_timer(), gc_tracer()->gc_id());
prepare_compaction();
}
class G1AdjustPointersClosure: public HeapRegionClosure {
--- 197,207 ----
// It is not required that we traverse spaces in the same order in
// phase2, phase3 and phase4, but the ValidateMarkSweep live oops
// tracking expects us to do so. See comment under phase4.
! GCTraceTime tm("phase 2", G1Log::fine() && Verbose, true, gc_timer());
prepare_compaction();
}
class G1AdjustPointersClosure: public HeapRegionClosure {
*** 231,241 ****
void G1MarkSweep::mark_sweep_phase3() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
// Adjust the pointers to reflect the new locations
! GCTraceTime tm("phase 3", G1Log::fine() && Verbose, true, gc_timer(), gc_tracer()->gc_id());
// Need cleared claim bits for the roots processing
ClassLoaderDataGraph::clear_claimed_marks();
CodeBlobToOopClosure adjust_code_closure(&GenMarkSweep::adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
--- 230,240 ----
void G1MarkSweep::mark_sweep_phase3() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
// Adjust the pointers to reflect the new locations
! GCTraceTime tm("phase 3", G1Log::fine() && Verbose, true, gc_timer());
// Need cleared claim bits for the roots processing
ClassLoaderDataGraph::clear_claimed_marks();
CodeBlobToOopClosure adjust_code_closure(&GenMarkSweep::adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
*** 292,302 ****
// in the same order in phase2, phase3 and phase4. We don't quite do that
// here (code and comment not fixed for perm removal), so we tell the validate code
// to use a higher index (saved from phase2) when verifying perm_gen.
G1CollectedHeap* g1h = G1CollectedHeap::heap();
! GCTraceTime tm("phase 4", G1Log::fine() && Verbose, true, gc_timer(), gc_tracer()->gc_id());
G1SpaceCompactClosure blk;
g1h->heap_region_iterate(&blk);
}
--- 291,301 ----
// in the same order in phase2, phase3 and phase4. We don't quite do that
// here (code and comment not fixed for perm removal), so we tell the validate code
// to use a higher index (saved from phase2) when verifying perm_gen.
G1CollectedHeap* g1h = G1CollectedHeap::heap();
! GCTraceTime tm("phase 4", G1Log::fine() && Verbose, true, gc_timer());
G1SpaceCompactClosure blk;
g1h->heap_region_iterate(&blk);
}
< prev index next >