--- old/src/hotspot/share/gc/g1/g1RootProcessor.cpp 2018-04-11 13:44:16.992835229 +0200 +++ new/src/hotspot/share/gc/g1/g1RootProcessor.cpp 2018-04-11 13:44:16.727827091 +0200 @@ -28,11 +28,11 @@ #include "classfile/stringTable.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" -#include "gc/g1/bufferingOopClosure.hpp" #include "gc/g1/g1CodeBlobClosure.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1CollectorState.hpp" #include "gc/g1/g1GCPhaseTimes.hpp" +#include "gc/g1/g1ParScanThreadState.inline.hpp" #include "gc/g1/g1Policy.hpp" #include "gc/g1/g1RootClosures.hpp" #include "gc/g1/g1RootProcessor.hpp" @@ -72,7 +72,7 @@ _lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never), _n_workers_discovered_strong_classes(0) {} -void G1RootProcessor::evacuate_roots(G1EvacuationRootClosures* closures, uint worker_i) { +void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, G1EvacuationRootClosures* closures, uint worker_i) { double ext_roots_start = os::elapsedTime(); G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times(); @@ -117,10 +117,7 @@ assert(closures->second_pass_weak_clds() == NULL, "Should be null if not tracing metadata."); } - // Finish up any enqueued closure apps (attributed as object copy time). - closures->flush(); - - double obj_copy_time_sec = closures->closure_app_seconds(); + double const obj_copy_time_sec = TicksToTimeHelper::seconds(pss->trim_ticks_and_reset()); phase_times->record_time_secs(G1GCPhaseTimes::ObjCopy, worker_i, obj_copy_time_sec);