RFR: 8183124: Remove OopsInHeapRegionClosure
thomas.schatzl at oracle.com
Wed Jun 28 14:53:59 UTC 2017
On Wed, 2017-06-28 at 15:30 +0200, Erik Helin wrote:
> ...and now with subject as well :)
> On 06/28/2017 02:59 PM, Erik Helin wrote:
> > Hi all,
> > this small patch removes the class OopsInHeapRegionClosure.
> > OopsInHeapRegionClosure only contains a protected _from field and
> > the
> > public method set_from, and there are only two other classes
> > inheriting
> > from OopsInHeapRegionClosure (G1ScanClosureBase and
> > UpdareRsetDeferred).
> > This patch gets rid of the class OopsInHeapRegionClosure and adds
> > the
> > corresponding field and method to the classes inheriting from
> > OopsInHeapRegionClosure.
> > Patch: http://cr.openjdk.java.net/~ehelin/8183124/00/
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8183124
> > Testing: make jprt
from my POV there are two reasons here:
- the additional class only for that field adds more overhead in
various aspects than just duplicating the member.
- using _from in UpdateRSDeferred is due to current way of checking for
cross-region pointers, using the _from value. It kind of saves us from
recreating it. However there are better options here that will fix both
JDK-8183127 and remove the need for the _from pointer completely.
So overall, this change seems good to me.
More information about the hotspot-gc-dev