RFR: Unclutter ShenandoahHeap (multiple changes)

Aleksey Shipilev shade at redhat.com
Wed Sep 19 16:34:53 UTC 2018


http://cr.openjdk.java.net/~shade/shenandoah/unclutter-sh-heap/webrev.01/

This is a bulk webrev that tries to unclutter the main ShenandoahHeap class, before we try and
rearrange some of the declarations. I deliberately split it in several changesets to simplify
backports. A brief tour of changes:

 *) Homogenize unimplemented stubs handling. This removes most of the stubs that have
ShouldNotReachThere/ShouldNotCallThis/Unimplemented in favor of our clear-cut define. Those stubs
are needed to match the overly-wide upstream interface, but nothing actually calls those stubs if GC
does not want it.

 *) Remove unused alloc-seq recording for start/end of GC cycle. It was there for partial
heuristics, and it is not needed now. These methods are slowly bit-rotting and clutter the ShHeap.

 *) Move ShenandoahAllocType and ShenandoahAllocRequest to separate file. This cuts down the clutter
in ShHeap by moving the 200+ line definition into the separate file.

 *) Inline ShHeap::prepare_concurrent_evacuation. The method has only one use, and it is small to be
inlined into op_final_mark.

 *) Inline ShHeap::fixup_roots. The method has only one use, and it can be inlined right at use.

 *) Remove ShHeap::region_in_collection_set in favor of SHR::in_cset. We already have this data in
region status, there is no need to keep the separate method for it. Verifier still checks the
collection set view and region statuses are in sync.

 *) Inline ShHeap::do_marked_object_complete. The method was a convenience for two asserts it had.
Can be inlined right at use to declutter ShHeap.

 *) Rename concurrentMark -> concurrent_mark. Obvious camelCase removal.

Testing: tier3_gc_shenandoah {fastdebug|release}

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list