Currently the set of survivor regions are stored as a linked list between gc pauses using the YoungList class.
In order to reduce coupling in the code and simplify it I suggest to instead store the survivor regions in a growable array. This removes some linked list head and tail pointers passed around to the policy and the complexity of maintaining a sublist of the young regions linked list in YoungList.
The amount of survivor regions should hopefully not reach large enough numbers such that the size of the array becomes a problem.
The concurrent root region scan will become a lot simpler since it can now be rewritten to simply do an atomic increment on a shared index variable to claim regions for scanning.
In order to reduce coupling in the code and simplify it I suggest to instead store the survivor regions in a growable array. This removes some linked list head and tail pointers passed around to the policy and the complexity of maintaining a sublist of the young regions linked list in YoungList.
The amount of survivor regions should hopefully not reach large enough numbers such that the size of the array becomes a problem.
The concurrent root region scan will become a lot simpler since it can now be rewritten to simply do an atomic increment on a shared index variable to claim regions for scanning.
- relates to
-
JDK-8156660 JDK-8150393 does not set _scan_in_progress properly
-
- Resolved
-