RFR: Refactor region flags into FSM

Aleksey Shipilev shade at redhat.com
Wed Aug 23 13:52:05 UTC 2017


We had plenty of bugs caused by inconsistent flags over the regions. Checking them all around
Shenandoah code is fragile. Turns out, we can make the region state into proper finite state
machine, and just mechanically nail the transitions between region states, and have all the flags
derived from those states always consistent.

Webrev:
  http://cr.openjdk.java.net/~shade/shenandoah/region-fsm/webrev.01/

See shenandoahHeapRegion.hpp for FSM description.

The next step would be to common CollectionSet, FreeSet and region flags into a solid
HeapRegionManager, that will use these states to maintain collection/free-sets, thus providing a
consistent view over heap for all pieces of Shenandoah code.

Testing: hotspot_gc_shenandoah

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list