--- old/src/share/vm/gc/g1/concurrentMarkThread.cpp 2016-02-10 09:36:31.235236041 +0100 +++ new/src/share/vm/gc/g1/concurrentMarkThread.cpp 2016-02-10 09:36:31.127236037 +0100 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/classLoaderData.hpp" #include "gc/g1/concurrentMarkThread.inline.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1CollectorPolicy.hpp" @@ -133,6 +134,11 @@ HandleMark hm; double cycle_start = os::elapsedVTime(); + { + GCConcPhaseTimer(_cm, "Concurrent Clearing of Claimed Marks"); + ClassLoaderDataGraph::clear_claimed_marks(); + } + // We have to ensure that we finish scanning the root regions // before the next GC takes place. To ensure this we have to // make sure that we do not join the STS until the root regions @@ -141,8 +147,7 @@ // without the root regions have been scanned which would be a // correctness issue. - if (_cm->root_regions()->scan_in_progress()) { - assert(!cm()->has_aborted(), "Aborting before root region scanning is finished not supported."); + { GCConcPhaseTimer(_cm, "Concurrent Root Region Scanning"); _cm->scanRootRegions(); } --- old/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2016-02-10 09:36:31.451236050 +0100 +++ new/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2016-02-10 09:36:31.335236046 +0100 @@ -984,13 +984,11 @@ }; void G1ConcurrentMark::scanRootRegions() { - // Start of concurrent marking. - ClassLoaderDataGraph::clear_claimed_marks(); - // scan_in_progress() will have been set to true only if there was // at least one root region to scan. So, if it's false, we // should not attempt to do any further work. if (root_regions()->scan_in_progress()) { + assert(!has_aborted(), "Aborting before root region scanning is finished not supported."); GCTraceConcTime(Info, gc) tt("Concurrent Root Region Scan"); _parallel_marking_threads = calc_parallel_marking_threads(); --- old/src/share/vm/gc/g1/g1HeapVerifier.cpp 2016-02-10 09:36:31.683236060 +0100 +++ new/src/share/vm/gc/g1/g1HeapVerifier.cpp 2016-02-10 09:36:31.579236056 +0100 @@ -408,7 +408,7 @@ // print_extended_on() instead of print_on(). LogHandle(gc, verify) log; ResourceMark rm; - _g1h->print_extended_on(log.info_stream()); + _g1h->print_extended_on(log.error_stream()); } guarantee(!failures, "there should not have been any failures"); }