RFR (S): Specialize iteration over marked objects
Aleksey Shipilev
shade at redhat.com
Fri Nov 4 19:01:49 UTC 2016
Hi,
Our current ShenandoahHeap::marked_object_iterate does the virtual call
to ObjectClosure::do_object for every marked object, for every task out
there. When the per-oop work is small, this is not good. Also limits
optimizeability (e.g. coalescing ShenandoahHeap::heap(), oopDesc::*, etc).
This is the template-based specialization:
http://cr.openjdk.java.net/~shade/shenandoah/specialize-mark-iterate/webrev.01/
After this change, our work is concentrated in specialized methods, e.g.:
6.90% ShenandoahMarkObjsClosure<ShenandoahMarkUpdateRefsClosure,
false>::do_object_or_array
5.82% ShenandoahCompactObjectsTask::work
5.51% ShenandoahPrepareForCompactionTask::work
5.20% ShenandoahAdjustPointersClosure::do_oop
4.20% ShenandoahAdjustPointersTask::work
...
(for ShenandoahAdjustPointersClosure::do_oop, inlining breaks elsewhere,
to be handled separately)
Testing: hotspot_gc_shenandoah, jcstress -m quick, some microbenchmarks
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list