--- old/src/share/vm/gc/serial/genMarkSweep.cpp 2015-12-01 12:06:19.470930429 +0100 +++ new/src/share/vm/gc/serial/genMarkSweep.cpp 2015-12-01 12:06:19.370930432 +0100 @@ -34,7 +34,7 @@ #include "gc/shared/gcHeapSummary.hpp" #include "gc/shared/gcTimer.hpp" #include "gc/shared/gcTrace.hpp" -#include "gc/shared/gcTraceTime.hpp" +#include "gc/shared/gcTraceTime.inline.hpp" #include "gc/shared/genCollectedHeap.hpp" #include "gc/shared/generation.hpp" #include "gc/shared/genOopClosures.inline.hpp" @@ -70,8 +70,6 @@ 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, @@ -81,9 +79,6 @@ // 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). @@ -133,10 +128,6 @@ CodeCache::gc_epilogue(); JvmtiExport::gc_epilogue(); - if (PrintGC && !PrintGCDetails) { - gch->print_heap_change(gch_prev_used); - } - // refs processing: clean slate set_ref_processor(NULL); @@ -188,7 +179,7 @@ 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); + GCTraceTime(Trace, gc) tm("Phase 1: Mark live objects", _gc_timer); GenCollectedHeap* gch = GenCollectedHeap::heap(); @@ -261,7 +252,7 @@ GenCollectedHeap* gch = GenCollectedHeap::heap(); - GCTraceTime tm("phase 2", PrintGC && Verbose, true, _gc_timer); + GCTraceTime(Trace, gc) tm("Phase 2: Compute new object addresses", _gc_timer); gch->prepare_for_compaction(); } @@ -277,7 +268,7 @@ GenCollectedHeap* gch = GenCollectedHeap::heap(); // Adjust the pointers to reflect the new locations - GCTraceTime tm("phase 3", PrintGC && Verbose, true, _gc_timer); + GCTraceTime(Trace, gc) tm("Phase 3: Adjust pointers", _gc_timer); // Need new claim bits for the pointer adjustment tracing. ClassLoaderDataGraph::clear_claimed_marks(); @@ -329,7 +320,7 @@ // 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); + GCTraceTime(Trace, gc) tm("Phase 4: Move objects", _gc_timer); GenCompactClosure blk; gch->generation_iterate(&blk, true);