8208611: Refactor SATBMarkQueue filtering to allow GC-specific filters
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Aug 1 07:26:30 UTC 2018
Hi,
On Tue, 2018-07-31 at 19:07 -0400, Kim Barrett wrote:
> Please review this change to the implementation of SATB mark queue
> filtering to permit a GC-specific filter to be provided. This is a
> preliminary step toward being able to share (most of) the SATB mark
> queue code between G1 and Shenandoah.
>
> We introduce a new abstract class, SATBMarkQueueFilter, which is
> responsible for filtering a queue. A SATBMarkQueueSet contains the
> filter object, which is constructed and installed by the GC-specific
> initialization of the qset.
>
> The former filter function has been changed to be a function
> template,
> with a function argument that provides the filter-out / retain
> decision. The GC-specific filter object calls that template with an
> appropriate function for the GC.
>
> For G1, it all gets nicely inlined (with gcc; I haven't looked at the
> generated code for other compilers), so the only overhead for this
> refactoring is the replacement of a (possibly inlined, but probably
> not) ordinary function call with a virtual function call per buffer
> completion.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8208611
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8208611/open.00/
>
looks good.
Thomas
More information about the hotspot-gc-dev
mailing list