RFR (S): 8037344: Use the "next" field to iterate over fine remembered instead of using the hash table
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Apr 9 13:05:21 UTC 2014
Hi,
On Wed, 2014-04-09 at 14:37 +0200, Mikael Gerdin wrote:
> On Wednesday 09 April 2014 14.34.06 Thomas Schatzl wrote:
> > Hi,
> >
> > On Wed, 2014-04-09 at 13:46 +0200, Mikael Gerdin wrote:
> > > Hi Thomas,
> > >
> > > On Wednesday 09 April 2014 12.02.45 Thomas Schatzl wrote:
> > > > Hi all,
> > > >
> > > > I have been notified that the webrev does not apply to the jdk9/hs-gc
> > > >
> > > > repository any more.
> > > >
> > > > Here is an updated version:
> > > > http://cr.openjdk.java.net/~tschatzl/8037344/webrev.1/
> > >
> > > Just to make sure that I follow the subtleties in the code here, you set
> > > _cur_region_cur_card to -1 here. Then when fine_has_next is called it
> > > computes _cur_region_cur_card + 1 to get 0 and calls
> > > _bm.get_next_one_offset?
> > Exactly, this is to get the start condition right after switching from
> > coarse to fine entries or to the next fine PRT.
> > Get_next_one_offset() starts searching including the passed offset.
> >
> > I will add a comment.
>
> Thanks.
Done in http://cr.openjdk.java.net/~tschatzl/8037344/webrev.2/
void HeapRegionRemSetIterator::switch_to_next_prt(PerRegionTable* prt) {
assert(prt != NULL, "Cannot switch to NULL prt");
_fine_cur_prt = prt;
HeapWord* r_bot = _fine_cur_prt->hr()->bottom();
_cur_region_card_offset = _bosa->index_for(r_bot);
+ // The bitmap scan for the PRT always scans from _cur_region_cur_card + 1.
+ // To avoid special-casing this start case, and not miss the first bitmap
+ // entry, initialize _cur_region_cur_card with -1 instead of 0.
_cur_region_cur_card = (size_t)-1;
}
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list