Eliminate dual states which might result out-of-sync problem. and use _ordered_regions->active_regions() solely. Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/heap_regions_count/webrev.00/ Test: hotspot_gc_shenandoah: fastdebug and release Thanks, -Zhengyu