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

Thomas Schatzl thomas.schatzl at oracle.com
Thu Aug 6 14:35:23 UTC 2015


Hi Tom,

On Thu, 2015-08-06 at 10:12 -0400, Tom
 Benson wrote:
Hi Thomas,
> 
> On 8/6/2015 3:48 AM, Thomas Schatzl wrote:
> > 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?
> The cursor would not be advanced to to the end of the second mapping, 
> but rather to the end of region A 1.  So the current range being
> freed 
> would be reduced from (6,20) to (8,20).   Line 1148:
> 
>      if (start_region == prev_last_region) {
>        start_address = start_region->end();     // Resets start
address 
> to end of A1, in your example
> 

Okay, looks good. :)

Thomas





More information about the hotspot-gc-dev mailing list