RFR: Make major GC phases exclusive from each other

Roman Kennke rkennke at redhat.com
Tue Jan 30 09:54:18 UTC 2018


Currently, partial and traversal use overlapping GC phase bits: partial
also activates evac, traversal activates everything. This causes a little
mess when selecting barriers, as observed by Zhengyu last week.

This patch makes all the major phases exclusive (marking, evac,
update-refs, partial and traversal). Barriers are always included, and
never excluded. This seems cleaner and easier to understand to me.

The state bit for 'has-forwarded' is still overlapping. Not sure what to do
with that.

Bits in the gc-state bitmask are now addressed via mask, and not via
position. This allows to check for groups of phases in one check. E.g.
write-barriers are now checking for EVACUATION | PARTIAL | TRAVERSAL

Passes hotspot_gc_shenandoah

http://cr.openjdk.java.net/~rkennke/exclusive-gc-phases/webrev.00/

Ok?

Some observations while I did this:
- ShenandoahConditionalSATBBarrier can now be greatly simplified or even
eliminated
- Partial can use machinery from Traversal for speed boost: e.g.
ShenandoahEnqueueBarrier
- Traversal still has a liveness accounting problem

... all of which I will address in followup patches

Roman


More information about the shenandoah-dev mailing list