RFR (XS): 8033601: G1: Make array chunking use the same length field as the other young GCs

Bengt Rutisson bengt.rutisson at oracle.com
Tue Feb 4 13:06:27 PST 2014


Looks good. :)

Bengt


On 2/4/14 10:02 PM, Bengt Rutisson wrote:
>
> Hi everyone,
>
> I'm sponsoring the following fix from Tony:
>
> http://cr.openjdk.java.net/~brutisso/8033601/webrev.00/
>
> https://bugs.openjdk.java.net/browse/JDK-8033601
>
> From a previous email conversation on this email list:
>
> Talking about array chunking in G1, we noticed a small difference in 
> that code compared to what the other GCs (ParNew / PS) do. G1 uses the 
> to-space length field to encode how much of the array has been scanned 
> (i.e., the from-space length field is always correct). ParNew and PS 
> use the from-space length field (and the to-space length field is 
> always correct). I came across that issue when I was working on a 
> change to periodically scan PLABs (for some profiling stuff I was 
> working on) and in G1 some PLABs were unparseable because the length 
> field of arrays could be incorrect (even if the PLAB is retired, it's 
> possible that the length field is still incorrect given that other 
> threads might still be working on that array).
>
> The patch to change G1 to do what ParNew / PS also do is very small 
> (and we've had it for a few months in our repo without any issues). 
> Any chance of convincing you to also take it? I should be clear that 
> the patch doesn't fix a correctness issue in G1; the code is correct 
> as is. But it will bring G1 in line with the other two GCs and allow 
> PLAB scanning during GC, if you want to do that...
>
>
> Thanks,
> Bengt



More information about the hotspot-gc-dev mailing list