4596 BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots);
4597 BufferingOopsInGenClosure buf_scan_perm(scan_perm);
4598 buf_scan_perm.set_generation(perm_gen());
4599
4600 // Walk the code cache w/o buffering, because StarTask cannot handle
4601 // unaligned oop locations.
4602 CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, /*do_marking=*/ true);
4603
4604 process_strong_roots(false, // no scoping; this is parallel code
4605 collecting_perm_gen, so,
4606 &buf_scan_non_heap_roots,
4607 &eager_scan_code_roots,
4608 &buf_scan_perm);
4609
4610 // Now the ref_processor roots.
4611 if (!_process_strong_tasks->is_task_claimed(G1H_PS_refProcessor_oops_do)) {
4612 // We need to treat the discovered reference lists as roots and
4613 // keep entries (which are added by the marking threads) on them
4614 // live until they can be processed at the end of marking.
4615 ref_processor()->weak_oops_do(&buf_scan_non_heap_roots);
4616 ref_processor()->oops_do(&buf_scan_non_heap_roots);
4617 }
4618
4619 // Finish up any enqueued closure apps (attributed as object copy time).
4620 buf_scan_non_heap_roots.done();
4621 buf_scan_perm.done();
4622
4623 double ext_roots_end = os::elapsedTime();
4624
4625 g1_policy()->reset_obj_copy_time(worker_i);
4626 double obj_copy_time_sec = buf_scan_perm.closure_app_seconds() +
4627 buf_scan_non_heap_roots.closure_app_seconds();
4628 g1_policy()->record_obj_copy_time(worker_i, obj_copy_time_sec * 1000.0);
4629
4630 double ext_root_time_ms =
4631 ((ext_roots_end - ext_roots_start) - obj_copy_time_sec) * 1000.0;
4632
4633 g1_policy()->record_ext_root_scan_time(worker_i, ext_root_time_ms);
4634
4635 // Scan strong roots in mark stack.
4636 if (!_process_strong_tasks->is_task_claimed(G1H_PS_mark_stack_oops_do)) {
|
4596 BufferingOopClosure buf_scan_non_heap_roots(scan_non_heap_roots);
4597 BufferingOopsInGenClosure buf_scan_perm(scan_perm);
4598 buf_scan_perm.set_generation(perm_gen());
4599
4600 // Walk the code cache w/o buffering, because StarTask cannot handle
4601 // unaligned oop locations.
4602 CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, /*do_marking=*/ true);
4603
4604 process_strong_roots(false, // no scoping; this is parallel code
4605 collecting_perm_gen, so,
4606 &buf_scan_non_heap_roots,
4607 &eager_scan_code_roots,
4608 &buf_scan_perm);
4609
4610 // Now the ref_processor roots.
4611 if (!_process_strong_tasks->is_task_claimed(G1H_PS_refProcessor_oops_do)) {
4612 // We need to treat the discovered reference lists as roots and
4613 // keep entries (which are added by the marking threads) on them
4614 // live until they can be processed at the end of marking.
4615 ref_processor()->weak_oops_do(&buf_scan_non_heap_roots);
4616 }
4617
4618 // Finish up any enqueued closure apps (attributed as object copy time).
4619 buf_scan_non_heap_roots.done();
4620 buf_scan_perm.done();
4621
4622 double ext_roots_end = os::elapsedTime();
4623
4624 g1_policy()->reset_obj_copy_time(worker_i);
4625 double obj_copy_time_sec = buf_scan_perm.closure_app_seconds() +
4626 buf_scan_non_heap_roots.closure_app_seconds();
4627 g1_policy()->record_obj_copy_time(worker_i, obj_copy_time_sec * 1000.0);
4628
4629 double ext_root_time_ms =
4630 ((ext_roots_end - ext_roots_start) - obj_copy_time_sec) * 1000.0;
4631
4632 g1_policy()->record_ext_root_scan_time(worker_i, ext_root_time_ms);
4633
4634 // Scan strong roots in mark stack.
4635 if (!_process_strong_tasks->is_task_claimed(G1H_PS_mark_stack_oops_do)) {
|