RFR: 8075215: SATB buffer processing found reclaimed humongous object

Eric Caspole eric.caspole at oracle.com
Thu Apr 30 14:40:41 UTC 2015

Hi Kim,
Looks good.

On 4/28/2015 1:55 PM, Kim Barrett wrote:
> Please review this fix for a problem with eager reclaim of humongous
> objects.
> The elements of SATB buffers are being processed in the same way as
> elements of the mark queue and when scanning objects (e.g. by calling
> CMTask::deal_with_reference).  That no longer works because SATB
> buffers may contain references to reclaimed humongous objects.
> Scrubbing the SATB buffers after eager reclaim of humongous objects
> would extend the pause.  We instead take advantage of the tests needed
> for deciding whether a reference needs to be marked being sufficient
> to also filter out stale references to reclaimed humongous objects.
> We just need to be more circumspect when processing the SATB buffers
> and not assume (and assert) the entries are valid objects until those
> tests have been applied, unlike in other cases.
> To support this new behavior:
> - CMTask::deal_with_reference is now split into an outer part that
> performs tests on an object to determine whether it needs to be shaded
> grey, and an inner part that performs the shading.
> - SATB buffer is changed to perform similar tests on possibly stale
> pointers, and once verified to be interesting, then call the shared
> inner part to perform the shading.  To enable the new SATB buffer
> processing, the closure involved is changed from an ObectClosure to a
> new SATBBufferClosure.
> Also made ObjPtrQueue::apply_closure_and_empty() public to eliminate
> the need for some friends.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8075215
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8075215/webrev.00/
> Testing:
> Aurora ad hoc GC Nightly and VM quicktests with G1 as the collector
> local jtreg with G1 as the collector
> local refworkload with G1 as the collector

More information about the hotspot-gc-dev mailing list