< prev index next >

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

Print this page

        

*** 178,188 **** _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, --- 178,188 ---- _objarray_stack.clear(true); } void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) { // Recursively traverse all live objects and mark them ! GCTraceTime(Info, gc, phases) 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,
*** 206,215 **** --- 206,217 ---- &follow_cld_closure); } // Process reference objects found during marking { + GCTraceTime(Debug, gc, phases) tm_m("Reference Processing", gc_timer()); + ref_processor()->setup_policy(clear_all_softrefs); const ReferenceProcessorStats& stats = ref_processor()->process_discovered_references( &is_alive, &keep_alive, &follow_stack_closure, NULL, _gc_timer); gc_tracer()->report_gc_reference_stats(stats);
*** 217,227 **** // This is the point where the entire marking should have completed. assert(_marking_stack.is_empty(), "Marking should have completed"); { ! GCTraceTime(Debug, gc) tm_m("Class Unloading", gc_timer()); // Unload classes and purge the SystemDictionary. bool purged_class = SystemDictionary::do_unloading(&is_alive); // Unload nmethods. --- 219,229 ---- // This is the point where the entire marking should have completed. assert(_marking_stack.is_empty(), "Marking should have completed"); { ! GCTraceTime(Debug, gc, phases) tm_m("Class Unloading", gc_timer()); // Unload classes and purge the SystemDictionary. bool purged_class = SystemDictionary::do_unloading(&is_alive); // Unload nmethods.
*** 230,246 **** // Prune dead klasses from subklass/sibling/implementor lists. Klass::clean_weak_klass_links(&is_alive); } { ! GCTraceTime(Debug, gc) t("Scrub String Table", gc_timer()); // Delete entries for dead interned strings. StringTable::unlink(&is_alive); } { ! GCTraceTime(Debug, gc) t("Scrub Symbol Table", gc_timer()); // Clean up unreferenced symbols in symbol table. SymbolTable::unlink(); } gc_tracer()->report_object_count_after_gc(&is_alive); --- 232,248 ---- // Prune dead klasses from subklass/sibling/implementor lists. Klass::clean_weak_klass_links(&is_alive); } { ! GCTraceTime(Debug, gc, phases) t("Scrub String Table", gc_timer()); // Delete entries for dead interned strings. StringTable::unlink(&is_alive); } { ! GCTraceTime(Debug, gc, phases) t("Scrub Symbol Table", gc_timer()); // Clean up unreferenced symbols in symbol table. SymbolTable::unlink(); } gc_tracer()->report_object_count_after_gc(&is_alive);
*** 261,271 **** // 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 { --- 263,273 ---- // phase2, phase3 and phase4, but the ValidateMarkSweep live oops // tracking expects us to do so. See comment under phase4. GenCollectedHeap* gch = GenCollectedHeap::heap(); ! GCTraceTime(Info, gc, phases) tm("Phase 2: Compute new object addresses", _gc_timer); gch->prepare_for_compaction(); } class GenAdjustPointersClosure: public GenCollectedHeap::GenClosure {
*** 277,287 **** 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 --- 279,289 ---- void GenMarkSweep::mark_sweep_phase3() { GenCollectedHeap* gch = GenCollectedHeap::heap(); // Adjust the pointers to reflect the new locations ! GCTraceTime(Info, gc, phases) 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
*** 329,338 **** // 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); } --- 331,340 ---- // 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(Info, gc, phases) tm("Phase 4: Move objects", _gc_timer); GenCompactClosure blk; gch->generation_iterate(&blk, true); }
< prev index next >