< prev index next >
src/hotspot/share/gc/g1/g1RootProcessor.cpp
Print this page
rev 56302 : [mq]: 8231189-worker_i-renamings
@@ -72,34 +72,34 @@
_process_strong_tasks(G1RP_PS_NumElements),
_srs(n_workers),
_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
// (which are added by the marking threads) on them live
// until they can be processed at the end of marking.
_g1h->ref_processor_cm()->weak_oops_do(closures->strong_oops());
}
}
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();
}
_process_strong_tasks.all_tasks_completed(n_workers());
@@ -169,19 +169,19 @@
_process_strong_tasks.all_tasks_completed(n_workers());
}
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,
// let the thread process the weak nmethods.
// 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(),
closures->strong_codeblobs());
}
@@ -191,77 +191,77 @@
if (notify_claimed_roots_done) {
worker_has_discovered_all_strong_classes();
}
{
- 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());
}
}
}
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);
}
}
#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);
}
}
#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);
}
}
}
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);
}
}
< prev index next >