< prev index next >
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
Print this page
rev 7522 : * * *
8066827: Remove ReferenceProcessor::clean_up_discovered_references()
Summary: Abandon rather than clean up discovered references.
Reviewed-by:
@@ -1606,18 +1606,17 @@
set_did_compact(true);
// If the collection is being acquired from the background
// collector, there may be references on the discovered
- // references lists that have NULL referents (being those
- // that were concurrently cleared by a mutator) or
- // that are no longer active (having been enqueued concurrently
- // by the mutator).
- // Scrub the list of those references because Mark-Sweep-Compact
- // code assumes referents are not NULL and that all discovered
- // Reference objects are active.
- ref_processor()->clean_up_discovered_references();
+ // references lists. Abandon those references, since some
+ // of them may have become unreachable due to later mutator
+ // activity, and the compacting collector we're about to run
+ // won't see them as live.
+ ref_processor()->disable_discovery();
+ ref_processor()->abandon_partial_discovery();
+ ref_processor()->verify_no_references_recorded();
if (first_state > Idling) {
save_heap_summary();
}
@@ -1679,11 +1678,11 @@
ReferenceProcessorAtomicMutator rp_mut_atomic(ref_processor(), true);
// Temporarily make reference _discovery_ single threaded (non-MT)
ReferenceProcessorMTDiscoveryMutator rp_mut_discovery(ref_processor(), false);
ref_processor()->set_enqueuing_is_done(false);
- ref_processor()->enable_discovery(false /*verify_disabled*/, false /*check_no_refs*/);
+ ref_processor()->enable_discovery();
ref_processor()->setup_policy(clear_all_soft_refs);
// If an asynchronous collection finishes, the _modUnionTable is
// all clear. If we are assuming the collection from an asynchronous
// collection, clear the _modUnionTable.
assert(_collectorState != Idling || _modUnionTable.isAllClear(),
@@ -2996,11 +2995,11 @@
// acquire locks for subsequent manipulations
MutexLockerEx x(bitMapLock(),
Mutex::_no_safepoint_check_flag);
checkpointRootsInitialWork();
// enable ("weak") refs discovery
- rp->enable_discovery(true /*verify_disabled*/, true /*check_no_refs*/);
+ rp->enable_discovery();
_collectorState = Marking;
}
SpecializationStats::print();
}
< prev index next >