Small issue with array chunking in G1
Thomas Schatzl
thomas.schatzl at oracle.com
Fri Jan 31 13:28:32 UTC 2014
Hi Tony,
On Thu, 2014-01-30 at 11:29 -0500, Tony Printezis wrote:
> (looking at Thomas' recent change reminded me that I've been meaning to
> ask about this)
>
> 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...
Where is the patch to look at?
Thomas
More information about the hotspot-gc-dev
mailing list