-
Enhancement
-
Resolution: Fixed
-
P4
-
13
-
b20
SATBMarkQueueSet::filter_thread_buffers is called by G1 during each pause's root processing stage. The purpose of this call is to remove young objects from the queues, since they will be moved and the queue entries won't be updated and so will be stale.
However, full queue filtering (SATBMarkQueue::filter) will already take care of this. And even if full queue filtering is disabled (JDK-8079167), marking will eventually take care of it (the mark queue stacks may also contain such entries).
Another indication that it isn't necessary is that the filtering is only applied to the per-thread SATB queues, and is not applied to the completed buffers in the qset.
So unless there is some other reason for it, that function is just moving work from mutator or concurrent marking threads into GC pauses. That doesn't seem like the right tradeoff.
And if it were needed, the current predicate for calling it seems not quite right. It is checking the collector state's mark_or_rebuild_in_progress(), but we should only care about whether marking is active. It seems like that test shouldn't be needed at all, and instead filter_thread_buffers could check the qset's active state. But really, I think this function should just be eliminated.
However, full queue filtering (SATBMarkQueue::filter) will already take care of this. And even if full queue filtering is disabled (
Another indication that it isn't necessary is that the filtering is only applied to the per-thread SATB queues, and is not applied to the completed buffers in the qset.
So unless there is some other reason for it, that function is just moving work from mutator or concurrent marking threads into GC pauses. That doesn't seem like the right tradeoff.
And if it were needed, the current predicate for calling it seems not quite right. It is checking the collector state's mark_or_rebuild_in_progress(), but we should only care about whether marking is active. It seems like that test shouldn't be needed at all, and instead filter_thread_buffers could check the qset's active state. But really, I think this function should just be eliminated.
- relates to
-
JDK-8223359 JDK-8221359 breaks TestG1ParallelPhases.java
-
- Resolved
-
-
JDK-8221362 Refactor PtrQueueSet derivative thread iterating functions
-
- Closed
-