RFR: 8154343: Make SATB related code available to other GCs

Roman Kennke rkennke at redhat.com
Fri Apr 15 19:17:49 UTC 2016

I just noticed that I made the patch against the jdk9 repository,
instead of jdk9-dev. There was a small change to make to
require_marking()/retain_entry(). The updated webrev is here:


And I also forgot to post a link to the jira entry:

Please let me know what you think, and if I can commit it. Thanks!


Am Freitag, den 15.04.2016, 19:31 +0200 schrieb Roman Kennke:
> Hi,
> I propose the following patch to move the SATB queue code from gc/g1
> into gc/shared. The issue is that we (Shenandoah devs) are using it
> too, and get a mess everytime we merge upstream changes. And besides,
> it's referenced from a couple of places.
> Some details:
> - satbMarkQueue.[hpp|cpp] and ptrQueue.[hpp|cpp] are moved over to
> gc/shared
> - The only G1 reference in that code was in the filter() method. I
> moved requires_marking() into G1CollectedHeap, and it's called via a
> templated filter_impl(), this should avoid *any* potential
> performance
> impact. Reusing that in another GC (e.g. Shenandoah) would require to
> implement an non-virtual inline require_marking() method in the
> CollectedHeap subclass, and add a driver clause to filter(), so that
> the compiler generates the templated filter_impl().
> - enqueue() has been moved from G1SATBCardTableModRefBS into
> SATBMarkQueue, it's still a static method.
> - SATB related globals have been moved into globals.hpp, in the GC
> section, and got their 'G1' prefix removed. I hope that's ok?
> The complete set of changes is here:
> http://cr.openjdk.java.net/~rkennke/jdk-8154343/webrev.00/
> Any thoughts? Ok to commit&push?
> Best regards,
> Roman

More information about the hotspot-gc-dev mailing list