RFR(S): 8155209: Move setting of young index in cset to G1CollectionSet

Stefan Johansson stefan.johansson at oracle.com
Wed Apr 27 11:33:49 UTC 2016


Hi Mikael,

On 2016-04-27 12:08, Mikael Gerdin wrote:
> Hi all,
>
> Please review this change to how _young_index_in_cset is set in 
> HeapRegions.
>
> G1 maintains a numbering of all young regions in the collection set in 
> order to record the amount of bytes copied from each young region in a 
> convenient fashion.
> This done by having a _young_index_in_cset member in each HeapRegion 
> which is -1 for non-young and >= 0 for young regions.
>
> This change moves the responsibility for setting this value to 
> G1CollectionSet, where it's easier to verify that the indices are set 
> in the correct manner for survivor and eden regions instead of relying 
> on YoungList and its state changes to ensure that the indices are 
> correct and unique.
>
> The new code is in my mind much more straightforward in how the 
> indices are set up but still I've added some verification code to 
> ensure that there are no collisions in the numbering.
>
> This change is part of an effort to simplify the YoungList code.
>
> Testing: JPRT
> Bug: https://bugs.openjdk.java.net/browse/JDK-8155209
> Webrev: http://cr.openjdk.java.net/~mgerdin/8155209/webrev.0/
>
Looks good,
StefanJ

> Thanks
> /Mikael




More information about the hotspot-gc-dev mailing list