RFR (S): 8131734: Add free_archive_regions support to G1 for -Xshared:auto

Thomas Schatzl thomas.schatzl at oracle.com
Thu Aug 6 07:48:49 UTC 2015


Hi,

On Wed, 2015-08-05 at 16:42 -0400, Tom Benson wrote:
> Thanks, Kim.
> Tom
> 
> On 8/5/2015 3:27 PM, Kim Barrett wrote:
> > On Aug 5, 2015, at 3:21 PM, Tom Benson <tom.benson at oracle.com> wrote:
> >> Hi,
> >>
> >> Updated full and incremental webrevs are at:
> >>    http://cr.openjdk.java.net/~tbenson/8131734/webrev.01/
> >>    http://cr.openjdk.java.net/~tbenson/8131734/webrev.01.vs.00/
> > Looks good.
> >

Looking again at the code starting from line 1144 with the comment,
there may still be an issue here: consider a VM A having 8M regions 1,
2, and 3, each spanning 8M (see figure below; each letter represents 1M
of space), and a mapping from a VM B with 2M region size with the
following layout that is loaded into VM A and failed.

    1        2       3       region#
AAAAAAAA AAAAAAAA AAAAAAAA   VM A regions (8M region size)
  BB  BB BBBBBBBB BBBB       VM B mapping (2M region size)

E.g. the mapping is from 2-3M, and another mapping from 6-20M. E.g. the
ranges array contains

  (2, 3), (6, 20)

now, after freeing region 1 from the first mapping (2, 3), start_region
of the second mapping (=1) equals prev_last_region (=1); now the cursor
is advanced to the region of the end of the second mapping (=3),
forgetting to free region 2.

What am I missing here?

Thanks for adding the initialization checks.

Thanks,
  Thomas





More information about the hotspot-gc-dev mailing list