< prev index next >

src/share/vm/gc/g1/g1MarkSweep.cpp

Print this page

        

*** 27,37 **** #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "code/codeCache.hpp" #include "code/icBuffer.hpp" - #include "gc/g1/g1Log.hpp" #include "gc/g1/g1MarkSweep.hpp" #include "gc/g1/g1RootProcessor.hpp" #include "gc/g1/g1StringDedup.hpp" #include "gc/serial/markSweep.inline.hpp" #include "gc/shared/gcHeapSummary.hpp" --- 27,36 ----
*** 121,131 **** } 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(); --- 120,130 ---- } void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading, bool clear_all_softrefs) { // Recursively traverse all live objects and mark them ! GCTraceTime(Trace, gc) tm("Phase 1: Mark live objects", gc_timer()); G1CollectedHeap* g1h = G1CollectedHeap::heap(); // Need cleared claim bits for the roots processing ClassLoaderDataGraph::clear_claimed_marks();
*** 181,197 **** // used when verifying the dictionaries and so removing them // from the mark word can make verification of the dictionaries // fail. At the end of the GC, the original mark word values // (including hash values) are restored to the appropriate // objects. ! if (!VerifySilently) { ! gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying "); ! } ! g1h->verify(VerifySilently, VerifyOption_G1UseMarkWord); ! if (!VerifySilently) { ! gclog_or_tty->print_cr("]"); ! } } gc_tracer()->report_object_count_after_gc(&GenMarkSweep::is_alive); } --- 180,191 ---- // used when verifying the dictionaries and so removing them // from the mark word can make verification of the dictionaries // fail. At the end of the GC, the original mark word values // (including hash values) are restored to the appropriate // objects. ! GCTraceTime(Info, gc, verify)("During GC (full)"); ! g1h->verify(VerifyOption_G1UseMarkWord); } gc_tracer()->report_object_count_after_gc(&GenMarkSweep::is_alive); }
*** 201,211 **** // 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 { --- 195,205 ---- // 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(Trace, gc) tm("Phase 2: Compute new object addresses", gc_timer()); prepare_compaction(); } class G1AdjustPointersClosure: public HeapRegionClosure {
*** 234,244 **** 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); --- 228,238 ---- void G1MarkSweep::mark_sweep_phase3() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); // Adjust the pointers to reflect the new locations ! GCTraceTime(Trace, gc) tm("Phase 3: Adjust pointers", gc_timer()); // Need cleared claim bits for the roots processing ClassLoaderDataGraph::clear_claimed_marks(); CodeBlobToOopClosure adjust_code_closure(&GenMarkSweep::adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
*** 295,305 **** // 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); } --- 289,299 ---- // 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(Trace, gc) tm("Phase 4: Move objects", gc_timer()); G1SpaceCompactClosure blk; g1h->heap_region_iterate(&blk); }
< prev index next >