< prev index next >
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Print this page
rev 7992 : G1RootProcessor
rev 7993 : Convert G1 to G1RootProcessor
rev 7996 : imported patch trace-metadata-comment
rev 7998 : imported patch thomas-comments
rev 7999 : imported patch eriks-comments
@@ -3091,11 +3091,11 @@
// and the nmethods in the code cache.
G1VerifyCodeRootOopClosure codeRootsCl(this, &rootsCl, vo);
G1VerifyCodeRootBlobClosure blobsCl(&codeRootsCl);
{
- G1RootProcessor root_processor(this, false /* trace_metadata */);
+ G1RootProcessor root_processor(this);
root_processor.process_all_roots(&rootsCl,
&cldCl,
&blobsCl);
}
@@ -4448,17 +4448,20 @@
OopClosure* strong_root_cl;
OopClosure* weak_root_cl;
CLDClosure* strong_cld_cl;
CLDClosure* weak_cld_cl;
+ bool trace_metadata = false;
+
if (_g1h->g1_policy()->during_initial_mark_pause()) {
// We also need to mark copied objects.
strong_root_cl = &scan_mark_root_cl;
strong_cld_cl = &scan_mark_cld_cl;
if (ClassUnloadingWithConcurrentMark) {
weak_root_cl = &scan_mark_weak_root_cl;
weak_cld_cl = &scan_mark_weak_cld_cl;
+ trace_metadata = true;
} else {
weak_root_cl = &scan_mark_root_cl;
weak_cld_cl = &scan_mark_cld_cl;
}
} else {
@@ -4472,10 +4475,11 @@
_root_processor->evacuate_roots(strong_root_cl,
weak_root_cl,
strong_cld_cl,
weak_cld_cl,
+ trace_metadata,
worker_id);
G1ParPushHeapRSClosure push_heap_rs_cl(_g1h, &pss);
_root_processor->scan_remembered_sets(&push_heap_rs_cl,
weak_root_cl,
@@ -5462,17 +5466,14 @@
assert(dirty_card_queue_set().completed_buffers_num() == 0, "Should be empty");
double start_par_time_sec = os::elapsedTime();
double end_par_time_sec;
{
- const bool during_im = g1_policy()->during_initial_mark_pause();
- const bool trace_metadata = during_im && ClassUnloadingWithConcurrentMark;
-
- G1RootProcessor root_processor(this, trace_metadata);
+ G1RootProcessor root_processor(this);
G1ParTask g1_par_task(this, _task_queues, &root_processor);
// InitialMark needs claim bits to keep track of the marked-through CLDs.
- if (during_im) {
+ if (g1_policy()->during_initial_mark_pause()) {
ClassLoaderDataGraph::clear_claimed_marks();
}
// The individual threads will set their evac-failure closures.
if (PrintTerminationStats) G1ParScanThreadState::print_termination_stats_hdr();
< prev index next >