RFR (M): 8224741: Optimize the scan area during the Scan Heap Roots phase
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jul 4 09:28:50 UTC 2019
Hi Kim,
On Wed, 2019-07-03 at 17:06 -0400, Kim Barrett wrote:
> > On Jul 3, 2019, at 5:17 AM, Thomas Schatzl <
> > thomas.schatzl at oracle.com> wrote:
> > > src/hotspot/share/gc/g1/heapRegion.inline.hpp
> > > 296 // If obj is not an objArray and mr contains the start of
> > > the
> > > 297 // obj, then this could be an imprecise mark, and we need
> > > to
> > > 298 // process the entire object.
> > > 299 int size = obj->oop_iterate_size(cl);
> > > 300 return MAX2((HeapWord*)obj + size, mr.end());
> > >
> > > Maybe mention here also that there aren't any objects after obj
> > > in the region.
> >
> > Fixed.
>
> 300 // There are no objects after this humongous object in the
> region, so we
> 301 // can return the end of the object.
>
> That’s not quite what I had in mind. I was thinking something like
>
> We've scanned to the end of the object, but since there are no
> objects after this humongous object in the region, we can return the
> end of the region of that's greater.
Fixed according to your suggestion.
>
> > http://cr.openjdk.java.net/~tschatzl/8224741/webrev.1_to_2 (diff)
> > http://cr.openjdk.java.net/~tschatzl/8224741/webrev.2 (full)
> >
> > (These are only comment adjustments as suggested here, so no
> > testing)
>
> Looks good, other than the above suggested further comment tweak.
Leo also found a superfluous size_t cast that I removed in the webrevs
below:
http://cr.openjdk.java.net/~tschatzl/8224741/webrev.2_to_3 (diff)
http://cr.openjdk.java.net/~tschatzl/8224741/webrev.3 (full)
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list