RFR (XS): Avoid double-touching for array headers during mark

Roman Kennke rkennke at redhat.com
Wed Jan 11 16:34:51 UTC 2017


Looks good to me.

Roman


Am Mittwoch, den 11.01.2017, 17:19 +0100 schrieb Aleksey Shipilev:
> Hi,
> 
> There is a tiny micro-optimization in our marking code. We don't need
> to touch
> the array header before submitting the chunked array processing. G1
> already does
> this trick [1], don't see why we should not do the same:
>   http://cr.openjdk.java.net/~shade/shenandoah/arrays-double-header/w
> ebrev.01/
> 
> Testing: hotspot_gc_shenandoah
> 
> If you create the large tree with Node[2] {left, right} arrays in
> each node,
> then the marking times are significantly improved:
> 
> Before:
>  Concurrent Marking Times =   23.55 s (avg =  1121586 us)
>     (num =    21, lvls (10% step, us) =
>       1015625, 1132812, 1132812, 1132812, 1152344,
>       1152344, 1171875, 1171875, 1171875, max =  1231954)
> 
> After:
>  Concurrent Marking Times  =  22.10 s (avg =  1004685 us)
>     (num =    22, lvls (10% step, us) =
>        917969,  996094, 996094,  1015625, 1015625,
>       1015625, 1035156, 1035156, 1035156, max =  1096716)
> 
> (This, BTW, tells a bad story about re-touching klasses for objects
> in heap,
> which may be another source of improvements)
> 
> Thanks,
> -Aleksey
> 
> [1]
> http://hg.openjdk.java.net/jdk9/dev/hotspot/file/31f1d26c60df/src/sha
> re/vm/gc/g1/g1ParScanThreadState.inline.hpp#l104
> 


More information about the shenandoah-dev mailing list