< prev index next >

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

Print this page

        

@@ -120,11 +120,11 @@
 }
 
 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());
+  GCTraceTime(Info, gc, phases) tm("Phase 1: Mark live objects", gc_timer());
 
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
 
   // Need cleared claim bits for the roots processing
   ClassLoaderDataGraph::clear_claimed_marks();

@@ -135,10 +135,13 @@
     root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure,
                                         &GenMarkSweep::follow_cld_closure,
                                         &follow_code_closure);
   }
 
+  {
+    GCTraceTime(Debug, gc, phases) trace("Reference Processing", gc_timer());
+
   // Process reference objects found during marking
   ReferenceProcessor* rp = GenMarkSweep::ref_processor();
   assert(rp == g1h->ref_processor_stw(), "Sanity");
 
   rp->setup_policy(clear_all_softrefs);

@@ -147,17 +150,17 @@
                                       &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");
 
   {
-    GCTraceTime(Debug, gc) trace("Class Unloading", gc_timer());
+    GCTraceTime(Debug, gc, phases) trace("Class Unloading", gc_timer());
 
     // Unload classes and purge the SystemDictionary.
     bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive);
 
     // Unload nmethods.

@@ -166,17 +169,17 @@
     // Prune dead klasses from subklass/sibling/implementor lists.
     Klass::clean_weak_klass_links(&GenMarkSweep::is_alive);
   }
 
   {
-    GCTraceTime(Debug, gc) trace("Scrub String and Symbol Tables", gc_timer());
+    GCTraceTime(Debug, gc, phases) trace("Scrub String and Symbol Tables", gc_timer());
     // Delete entries for dead interned string and clean up unreferenced symbols in symbol table.
     g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive);
   }
 
   if (G1StringDedup::is_enabled()) {
-    GCTraceTime(Debug, gc) trace("String Deduplication Unlink", gc_timer());
+    GCTraceTime(Debug, gc, phases) trace("String Deduplication Unlink", gc_timer());
     G1StringDedup::unlink(&GenMarkSweep::is_alive);
   }
 
   if (VerifyDuringGC) {
     HandleMark hm;  // handle scope

@@ -207,11 +210,11 @@
 
   // 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());
+  GCTraceTime(Info, gc, phases) tm("Phase 2: Compute new object addresses", gc_timer());
 
   prepare_compaction();
 }
 
 class G1AdjustPointersClosure: public HeapRegionClosure {

@@ -234,11 +237,11 @@
 
 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());
+  GCTraceTime(Info, gc, phases) 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,11 +298,11 @@
   // 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());
+  GCTraceTime(Info, gc, phases) tm("Phase 4: Move objects", gc_timer());
 
   G1SpaceCompactClosure blk;
   g1h->heap_region_iterate(&blk);
 
 }
< prev index next >