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

Roman Kennke rkennke at redhat.com
Fri Apr 15 17:31:24 UTC 2016


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