The method G1CollectedHeap::determine_start_concurrent_mark_gc() basically calls G1Policy::decide_on_conc_mark_initiation(), with the difference mostly because the former also checks whether we are currently terminating the VM (and decide that we should not start a concurrent mark then).
This is apparently to avoid publishing _cm_thread in a getter (for ConcurrentMarkThread::should_terminate); the suggested fix is to merge both methods and provide the result of ConcurrentMarkThread::should_terminate() in G1CollectedHeap.
I think this is an okay change because
* ConcurrentMarkThread::should_terminate is just another factor for determining whether to start marking
* ConcurrentMarkThread::should_terminate is actually asked for in another place too
* it helps with avoiding publishing G1CollectedHeap::_cm_thread for the move of young collector code to separate files
This is apparently to avoid publishing _cm_thread in a getter (for ConcurrentMarkThread::should_terminate); the suggested fix is to merge both methods and provide the result of ConcurrentMarkThread::should_terminate() in G1CollectedHeap.
I think this is an okay change because
* ConcurrentMarkThread::should_terminate is just another factor for determining whether to start marking
* ConcurrentMarkThread::should_terminate is actually asked for in another place too
* it helps with avoiding publishing G1CollectedHeap::_cm_thread for the move of young collector code to separate files
- duplicates
-
JDK-8151995 Move CM Thread execution state into G1CollectorState
-
- Closed
-