< prev index next >
src/share/vm/gc_implementation/g1/g1RootProcessor.cpp
Print this page
rev 7992 : G1RootProcessor
rev 7993 : Convert G1 to G1RootProcessor
rev 7994 : Move remaining root processing to GenCollectedHeap
rev 7997 : imported patch rename-done_with_threads
rev 7998 : imported patch thomas-comments
rev 7999 : imported patch eriks-comments
@@ -111,22 +111,22 @@
_lock.wait(Mutex::_no_safepoint_check_flag, 0, false);
}
}
}
-G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, bool trace_metadata) :
+G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h) :
_g1h(g1h),
_process_strong_tasks(new SubTasksDone(G1RP_PS_NumElements)),
_srs(g1h),
_lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never),
- _n_workers_discovered_strong_classes(0),
- _trace_metadata(trace_metadata) {}
+ _n_workers_discovered_strong_classes(0) {}
void G1RootProcessor::evacuate_roots(OopClosure* scan_non_heap_roots,
OopClosure* scan_non_heap_weak_roots,
CLDClosure* scan_strong_clds,
CLDClosure* scan_weak_clds,
+ bool trace_metadata,
uint worker_i) {
// First scan the shared roots.
double ext_roots_start = os::elapsedTime();
BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots);
@@ -137,18 +137,18 @@
// CodeBlobClosures are not interoperable with BufferingOopClosures
G1CodeBlobClosure root_code_blobs(scan_non_heap_roots);
process_java_roots(strong_roots,
- _trace_metadata ? scan_strong_clds : NULL,
+ trace_metadata ? scan_strong_clds : NULL,
scan_strong_clds,
- _trace_metadata ? NULL : scan_weak_clds,
+ trace_metadata ? NULL : scan_weak_clds,
&root_code_blobs);
// This is the point where this worker thread will not find more strong CLDs/nmethods.
// Report this so G1 can synchronize the strong and weak CLDs/nmethods processing.
- if (_trace_metadata) {
+ if (trace_metadata) {
worker_has_discovered_all_strong_classes();
}
process_vm_roots(strong_roots, weak_roots);
@@ -159,11 +159,11 @@
// (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(&buf_scan_non_heap_roots);
}
- if (_trace_metadata) {
+ if (trace_metadata) {
// Barrier to make sure all workers passed
// the strong CLD and strong nmethods phases.
wait_until_all_strong_classes_discovered();
// Now take the complement of the strong CLDs.
< prev index next >