src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
Print this page
*** 1576,1585 ****
--- 1576,1586 ----
NOT_PRODUCT(ref_processor()->verify_no_references_recorded());
COMPILER2_PRESENT(DerivedPointerTable::clear());
ref_processor()->enable_discovery();
+ ref_processor()->snap_policy(maximum_heap_compaction);
bool marked_for_unloading = false;
marking_start.update();
marking_phase(vmthread_cm, maximum_heap_compaction);
*** 1892,1921 ****
}
// Process reference objects found during marking
{
TraceTime tm_r("reference processing", print_phases(), true, gclog_or_tty);
- ReferencePolicy *soft_ref_policy;
- if (maximum_heap_compaction) {
- soft_ref_policy = new AlwaysClearPolicy();
- } else {
- #ifdef COMPILER2
- soft_ref_policy = new LRUMaxHeapPolicy();
- #else
- soft_ref_policy = new LRUCurrentHeapPolicy();
- #endif // COMPILER2
- }
- assert(soft_ref_policy != NULL, "No soft reference policy");
if (ref_processor()->processing_is_mt()) {
RefProcTaskExecutor task_executor;
ref_processor()->process_discovered_references(
! soft_ref_policy, is_alive_closure(), &mark_and_push_closure,
! &follow_stack_closure, &task_executor);
} else {
ref_processor()->process_discovered_references(
! soft_ref_policy, is_alive_closure(), &mark_and_push_closure,
! &follow_stack_closure, NULL);
}
}
TraceTime tm_c("class unloading", print_phases(), true, gclog_or_tty);
// Follow system dictionary roots and unload classes.
--- 1893,1909 ----
}
// Process reference objects found during marking
{
TraceTime tm_r("reference processing", print_phases(), true, gclog_or_tty);
if (ref_processor()->processing_is_mt()) {
RefProcTaskExecutor task_executor;
ref_processor()->process_discovered_references(
! is_alive_closure(), &mark_and_push_closure, &follow_stack_closure, &task_executor);
} else {
ref_processor()->process_discovered_references(
! is_alive_closure(), &mark_and_push_closure, &follow_stack_closure, NULL);
}
}
TraceTime tm_c("class unloading", print_phases(), true, gclog_or_tty);
// Follow system dictionary roots and unload classes.