RFR: 8139892: Allow G1CollectorPolicy to specify if reference processing should be enabled

Erik Helin erik.helin at oracle.com
Thu Nov 19 14:26:55 UTC 2015


On 2015-11-18, Kim Barrett wrote:
> On Nov 10, 2015, at 8:05 AM, Erik Helin <erik.helin at oracle.com> wrote:
> > 
> > Hi all,
> > 
> > this patch adds the method `bool should_process_references() const` to
> > G1CollectorPolicy and also updates G1CollectedHeap to make use of it.
> > This enables a G1CollectorPolicy to make decisions about whether
> > references should be processed or not.
> > 
> > Enhancement:
> > https://bugs.openjdk.java.net/browse/JDK-8139892
> > 
> > Webrev:
> > http://cr.openjdk.java.net/~ehelin/8139892/webrev.00/
> > 
> > Testing:
> > JPRT
> > 
> > Thanks,
> > Erik
> 
> ------------------------------------------------------------------------------
> src/share/vm/gc/g1/g1CollectorPolicy.hpp
>  738   virtual bool should_process_references() const {
>  739     return true;
>  740   }
> 
> Is the new behavior really strictly G1-specific?  Or should this be at
> the CollectorPolicy level?

It is G1 specific, we should not move this to CollectorPolicy.

> And I'm assuming some other G1 policy is going to provide a less
> trivial implementation?

Yes.

Thanks,
Erik


More information about the hotspot-gc-dev mailing list