966
967 // Trace and reset failed promotion info.
968 if (promotion_failed()) {
969 thread_state_set.trace_promotion_failed(gc_tracer());
970 }
971
972 // Process (weak) reference objects found during scavenge.
973 ReferenceProcessor* rp = ref_processor();
974 IsAliveClosure is_alive(this);
975 ScanWeakRefClosure scan_weak_ref(this);
976 KeepAliveClosure keep_alive(&scan_weak_ref);
977 ScanClosure scan_without_gc_barrier(this, false);
978 ScanClosureWithParBarrier scan_with_gc_barrier(this, true);
979 set_promo_failure_scan_stack_closure(&scan_without_gc_barrier);
980 EvacuateFollowersClosureGeneral evacuate_followers(gch,
981 &scan_without_gc_barrier, &scan_with_gc_barrier);
982 rp->setup_policy(clear_all_soft_refs);
983 // Can the mt_degree be set later (at run_task() time would be best)?
984 rp->set_active_mt_degree(active_workers);
985 ReferenceProcessorStats stats;
986 ReferenceProcessorPhaseTimes pt(_gc_timer, rp->num_q());
987 if (rp->processing_is_mt()) {
988 ParNewRefProcTaskExecutor task_executor(*this, *_old_gen, thread_state_set);
989 stats = rp->process_discovered_references(&is_alive, &keep_alive,
990 &evacuate_followers, &task_executor,
991 &pt);
992 } else {
993 thread_state_set.flush();
994 gch->save_marks();
995 stats = rp->process_discovered_references(&is_alive, &keep_alive,
996 &evacuate_followers, NULL,
997 &pt);
998 }
999 _gc_tracer.report_gc_reference_stats(stats);
1000 _gc_tracer.report_tenuring_threshold(tenuring_threshold());
1001 pt.print_all_references();
1002
1003 assert(gch->no_allocs_since_save_marks(), "evacuation should be done at this point");
1004
1005 WeakProcessor::weak_oops_do(&is_alive, &keep_alive);
1006
|
966
967 // Trace and reset failed promotion info.
968 if (promotion_failed()) {
969 thread_state_set.trace_promotion_failed(gc_tracer());
970 }
971
972 // Process (weak) reference objects found during scavenge.
973 ReferenceProcessor* rp = ref_processor();
974 IsAliveClosure is_alive(this);
975 ScanWeakRefClosure scan_weak_ref(this);
976 KeepAliveClosure keep_alive(&scan_weak_ref);
977 ScanClosure scan_without_gc_barrier(this, false);
978 ScanClosureWithParBarrier scan_with_gc_barrier(this, true);
979 set_promo_failure_scan_stack_closure(&scan_without_gc_barrier);
980 EvacuateFollowersClosureGeneral evacuate_followers(gch,
981 &scan_without_gc_barrier, &scan_with_gc_barrier);
982 rp->setup_policy(clear_all_soft_refs);
983 // Can the mt_degree be set later (at run_task() time would be best)?
984 rp->set_active_mt_degree(active_workers);
985 ReferenceProcessorStats stats;
986 ReferenceProcessorPhaseTimes pt(_gc_timer, rp->num_queues());
987 if (rp->processing_is_mt()) {
988 ParNewRefProcTaskExecutor task_executor(*this, *_old_gen, thread_state_set);
989 stats = rp->process_discovered_references(&is_alive, &keep_alive,
990 &evacuate_followers, &task_executor,
991 &pt);
992 } else {
993 thread_state_set.flush();
994 gch->save_marks();
995 stats = rp->process_discovered_references(&is_alive, &keep_alive,
996 &evacuate_followers, NULL,
997 &pt);
998 }
999 _gc_tracer.report_gc_reference_stats(stats);
1000 _gc_tracer.report_tenuring_threshold(tenuring_threshold());
1001 pt.print_all_references();
1002
1003 assert(gch->no_allocs_since_save_marks(), "evacuation should be done at this point");
1004
1005 WeakProcessor::weak_oops_do(&is_alive, &keep_alive);
1006
|