--- old/src/hotspot/share/gc/g1/g1RootProcessor.cpp 2019-09-18 17:51:14.737440877 +0200 +++ new/src/hotspot/share/gc/g1/g1RootProcessor.cpp 2019-09-18 17:51:14.541439788 +0200 @@ -74,19 +74,19 @@ _lock(Mutex::leaf, "G1 Root Scan barrier lock", false, Monitor::_safepoint_check_never), _n_workers_discovered_strong_classes(0) {} -void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_i) { +void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_id) { G1GCPhaseTimes* phase_times = _g1h->phase_times(); - G1EvacPhaseTimesTracker timer(phase_times, pss, G1GCPhaseTimes::ExtRootScan, worker_i); + G1EvacPhaseTimesTracker timer(phase_times, pss, G1GCPhaseTimes::ExtRootScan, worker_id); G1EvacuationRootClosures* closures = pss->closures(); - process_java_roots(closures, phase_times, worker_i, closures->trace_metadata() /* notify_claimed_roots_done */); + process_java_roots(closures, phase_times, worker_id, closures->trace_metadata() /* notify_claimed_roots_done */); - process_vm_roots(closures, phase_times, worker_i); + process_vm_roots(closures, phase_times, worker_id); { // Now the CM ref_processor roots. - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CMRefRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_refProcessor_oops_do)) { // We need to treat the discovered reference lists of the // concurrent mark ref processor as roots and keep entries @@ -97,7 +97,7 @@ } if (closures->trace_metadata()) { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WaitForStrongRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::WaitForStrongRoots, worker_id); // Wait here to make sure all workers passed the strong nmethods phase. wait_until_all_strong_classes_discovered(); } @@ -171,7 +171,7 @@ void G1RootProcessor::process_java_roots(G1RootClosures* closures, G1GCPhaseTimes* phase_times, - uint worker_i, + uint worker_id, bool notify_claimed_roots_done) { // Iterating over the the threads is done early to allow us to make sure that // the "strong" nmethods are processed first using the strong closure. After a barrier, @@ -179,7 +179,7 @@ // The problem is that nmethods are claimed to avoid duplicate iteration. This is // a way to make sure that for these nmethods we always apply the strong closure. { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_id); bool is_par = n_workers() > 1; Threads::possibly_parallel_oops_do(is_par, closures->strong_oops(), @@ -193,7 +193,7 @@ } { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CLDGRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::CLDGRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_ClassLoaderDataGraph_oops_do)) { ClassLoaderDataGraph::roots_cld_do(closures->strong_clds(), closures->weak_clds()); } @@ -202,39 +202,39 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures, G1GCPhaseTimes* phase_times, - uint worker_i) { + uint worker_id) { OopClosure* strong_roots = closures->strong_oops(); { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::UniverseRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::UniverseRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_Universe_oops_do)) { Universe::oops_do(strong_roots); } } { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JNIRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JNIRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_JNIHandles_oops_do)) { JNIHandles::oops_do(strong_roots); } } { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ObjectSynchronizerRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ObjectSynchronizerRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_ObjectSynchronizer_oops_do)) { ObjectSynchronizer::oops_do(strong_roots); } } { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ManagementRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ManagementRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_Management_oops_do)) { Management::oops_do(strong_roots); } } { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JVMTIRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::JVMTIRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_jvmti_oops_do)) { JvmtiExport::oops_do(strong_roots); } @@ -242,7 +242,7 @@ #if INCLUDE_AOT if (UseAOT) { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_aot_oops_do)) { AOTLoader::oops_do(strong_roots); } @@ -250,7 +250,7 @@ #endif { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_i); + G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::SystemDictionaryRoots, worker_id); if (_process_strong_tasks.try_claim_task(G1RP_PS_SystemDictionary_oops_do)) { SystemDictionary::oops_do(strong_roots); } @@ -259,7 +259,7 @@ void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure, G1GCPhaseTimes* phase_times, - uint worker_i) { + uint worker_id) { if (_process_strong_tasks.try_claim_task(G1RP_PS_CodeCache_oops_do)) { CodeCache::blobs_do(code_closure); }