RFR: 8139341: Hide ExtendedOopClosure::_ref_processor
Mikael Gerdin
mikael.gerdin at oracle.com
Tue Oct 13 08:26:24 UTC 2015
Hi Kim,
On 2015-10-12 02:39, Kim Barrett wrote:
> Please review this accessibility change to the
> ExtendedOopClosure::_ref_processor data member from public to private.
>
> ExtendedOopClosure::ref_processor is a new public reader function.
>
> ExtendedOopClosure::set_ref_processor_internal is a new protected
> writer function. The name is chosen to emphasize that it's use is
> rare and unusual; usually the reference processor should be set via a
> constructor argument.
>
> A couple of CMS closures were setting the reference processor
> explicitly in the constructor, and now use set_ref_processor_internal
> for that. This pre-existing behavior is a workaround for some class
> hierarchy issues that are out of scope for this change.
>
> G1ParScanClosure::set_ref_processor is a new public writer function
> which forwards to set_ref_processor_internal. This supports the
> addition and removal of the refproc from the closure embedded in the
> G1ParScanThreadState. I think that might really be a different
> enable/disable_discovery and should be done using those functions
> rather than setting the closure's refproc, but I want to pursue that
> as a separate change.
>
> MarkAndPushClosure::set_ref_processor is a new public writer function
> which forwards to set_ref_processor_internal. This supports the
> static construction of this MarkSweep closure before some of the other
> data structures (like the refproc) have been constructed.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8139341
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8139341/webrev.00/
Looks good to me.
/Mikael
> Note that this webrev is based on the changes for the in-review
> http://cr.openjdk.java.net/~kbarrett/8139200/webrev.00/
>
> Testing:
> JPRT
>
More information about the hotspot-gc-dev
mailing list