GenCollectedHeap::collect_generation() does some seemingly collector specific changes to discovery in generic code. This seems to be for CMS.
There is also the comment:
// Note on ref discovery: For what appear to be historical reasons,
// GCH enables and disabled (by enqueing) refs discovery.
// In the future this should be moved into the generation's
// collect method so that ref discovery and enqueueing concerns
// are local to a generation. The collect method could return
// an appropriate indication in the case that notification on
// the ref lock was needed. This will make the treatment of
// weak refs more uniform (and indeed remove such concerns
// from GCH). XXX
Do as the comment suggest and move discovery control into the collector specific collect() implementations.
There is also the comment:
// Note on ref discovery: For what appear to be historical reasons,
// GCH enables and disabled (by enqueing) refs discovery.
// In the future this should be moved into the generation's
// collect method so that ref discovery and enqueueing concerns
// are local to a generation. The collect method could return
// an appropriate indication in the case that notification on
// the ref lock was needed. This will make the treatment of
// weak refs more uniform (and indeed remove such concerns
// from GCH). XXX
Do as the comment suggest and move discovery control into the collector specific collect() implementations.
- relates to
-
JDK-8303467 Serial: Refactor reference processor
-
- Resolved
-