< prev index next >

src/share/vm/gc/serial/genMarkSweep.cpp

Print this page

        

*** 68,91 **** assert(ref_processor() == NULL, "no stomping"); assert(rp != NULL, "should be non-NULL"); set_ref_processor(rp); rp->setup_policy(clear_all_softrefs); ! GCTraceTime t1(GCCauseString("Full GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, NULL); gch->trace_heap_before_gc(_gc_tracer); // When collecting the permanent generation Method*s may be moving, // so we either have to flush all bcp data or convert it into bci. CodeCache::gc_prologue(); // Increment the invocation count _total_invocations++; - // Capture heap size before collection for printing. - size_t gch_prev_used = gch->used(); - // Capture used regions for each generation that will be // subject to collection, so that card table adjustments can // be made intelligently (see clear / invalidate further below). gch->save_used_regions(); --- 68,88 ---- assert(ref_processor() == NULL, "no stomping"); assert(rp != NULL, "should be non-NULL"); set_ref_processor(rp); rp->setup_policy(clear_all_softrefs); ! GCTraceTime(Info, gc) t1("Pause Full", NULL, gch->gc_cause(), true); gch->trace_heap_before_gc(_gc_tracer); // When collecting the permanent generation Method*s may be moving, // so we either have to flush all bcp data or convert it into bci. CodeCache::gc_prologue(); // Increment the invocation count _total_invocations++; // Capture used regions for each generation that will be // subject to collection, so that card table adjustments can // be made intelligently (see clear / invalidate further below). gch->save_used_regions();
*** 131,144 **** } CodeCache::gc_epilogue(); JvmtiExport::gc_epilogue(); - if (PrintGC && !PrintGCDetails) { - gch->print_heap_change(gch_prev_used); - } - // refs processing: clean slate set_ref_processor(NULL); // Update heap occupancy information which is used as // input to soft ref clearing policy at the next gc. --- 128,137 ----
*** 186,196 **** _objarray_stack.clear(true); } void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) { // Recursively traverse all live objects and mark them ! GCTraceTime tm("phase 1", PrintGC && Verbose, true, _gc_timer); GenCollectedHeap* gch = GenCollectedHeap::heap(); // Because follow_root_closure is created statically, cannot // use OopsInGenClosure constructor which takes a generation, --- 179,189 ---- _objarray_stack.clear(true); } void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) { // Recursively traverse all live objects and mark them ! GCTraceTime(Trace, gc) tm("phase 1: Mark live objects", _gc_timer); GenCollectedHeap* gch = GenCollectedHeap::heap(); // Because follow_root_closure is created statically, cannot // use OopsInGenClosure constructor which takes a generation,
*** 259,269 **** // phase2, phase3 and phase4, but the ValidateMarkSweep live oops // tracking expects us to do so. See comment under phase4. GenCollectedHeap* gch = GenCollectedHeap::heap(); ! GCTraceTime tm("phase 2", PrintGC && Verbose, true, _gc_timer); gch->prepare_for_compaction(); } class GenAdjustPointersClosure: public GenCollectedHeap::GenClosure { --- 252,262 ---- // phase2, phase3 and phase4, but the ValidateMarkSweep live oops // tracking expects us to do so. See comment under phase4. GenCollectedHeap* gch = GenCollectedHeap::heap(); ! GCTraceTime(Trace, gc) tm("phase 2: Compute new object addresses", _gc_timer); gch->prepare_for_compaction(); } class GenAdjustPointersClosure: public GenCollectedHeap::GenClosure {
*** 275,285 **** void GenMarkSweep::mark_sweep_phase3() { GenCollectedHeap* gch = GenCollectedHeap::heap(); // Adjust the pointers to reflect the new locations ! GCTraceTime tm("phase 3", PrintGC && Verbose, true, _gc_timer); // Need new claim bits for the pointer adjustment tracing. ClassLoaderDataGraph::clear_claimed_marks(); // Because the closure below is created statically, we cannot --- 268,278 ---- void GenMarkSweep::mark_sweep_phase3() { GenCollectedHeap* gch = GenCollectedHeap::heap(); // Adjust the pointers to reflect the new locations ! GCTraceTime(Trace, gc) tm("phase 3: Adjust pointers", _gc_timer); // Need new claim bits for the pointer adjustment tracing. ClassLoaderDataGraph::clear_claimed_marks(); // Because the closure below is created statically, we cannot
*** 327,336 **** // in the same order in phase2, phase3 and phase4. We don't quite do that // here (perm_gen first rather than last), so we tell the validate code // to use a higher index (saved from phase2) when verifying perm_gen. GenCollectedHeap* gch = GenCollectedHeap::heap(); ! GCTraceTime tm("phase 4", PrintGC && Verbose, true, _gc_timer); GenCompactClosure blk; gch->generation_iterate(&blk, true); } --- 320,329 ---- // in the same order in phase2, phase3 and phase4. We don't quite do that // here (perm_gen first rather than last), so we tell the validate code // to use a higher index (saved from phase2) when verifying perm_gen. GenCollectedHeap* gch = GenCollectedHeap::heap(); ! GCTraceTime(Trace, gc) tm("phase 4: Move objects", _gc_timer); GenCompactClosure blk; gch->generation_iterate(&blk, true); }
< prev index next >