RFR (S): Specialize iteration over marked objects

Roman Kennke rkennke at redhat.com
Fri Nov 4 19:26:13 UTC 2016


Good!


Makes me wonder if it's possible (I'm sure it would be worth) to do
something similar to the root scanning methods, in particular around
JavaThreads::oops_do(). Looks like a bigger effort though.

Roman

Am Freitag, den 04.11.2016, 20:01 +0100 schrieb Aleksey Shipilev:
> 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