RFR: 8031703 - Missing post-barrier in ReferenceProcessor

Thomas Schatzl thomas.schatzl at oracle.com
Wed Feb 5 11:01:34 UTC 2014

Hi Per,

On Tue, 2014-02-04 at 14:14 +0100, Per Liden wrote:
> Hi Thomas,
> >
> > There are some minor comments about related code:
> >
> > In G1CollectedHeap::ref_processing_init(), there seems to be a
> > copy&paste error when initializing the STW ref processor. I.e. the
> > discovered_list_needs_post_barrier parameter is false, but the comment
> > still reads:
> >
> >      // Setting next fields of discovered
> >      // lists requires a barrier.
> >
> > which seems odd since we pass false to the parameter.
> I agree that's a bit misleading. I have the feeling that whoever wrote 
> that comment intended to describe the argument itself and not what it's 
> set to in this particular case. I can adjust it while I'm at it. How about:
>                                  // Setting next fields of discovered
>                                  // lists does not require a barrier.

Yes, that's somewhat better.

I would prefer something that is more descriptive to the situation, e.g.
"Setting next fields ... do not require a barrier because references are
not moved during discovery as this reference processor is used during
the STW pause only." Or just the part after the "because". Maybe too
verbose, so I do not mind using your suggestion too.


More information about the hotspot-gc-dev mailing list