RFR: 8240873: Shenandoah: Short-cut arraycopy barriers

Roman Kennke rkennke at redhat.com
Wed Mar 11 19:54:17 UTC 2020


The strong invariant gives us an opportunity to short-cut
arraycopy-barriers:

- if the src object is beyond the safe-iteration limit, e.g. has been
allocated since evac-start, then it can not have any from-space
references and thus does not require updating.
- likewise, if the dst object is beyond TAMS, e.g. has been allocated
since mark-start, then it can only have references that must have been
reachable otherwise and thus don't require enqueueing in SATB.

Short-cutting on those condition cuts out 80-90% of arraycopy slowpaths.

It also brings in the closing of update-watermark after updating one
region is finished, originally proposed in "8240872: Shenandoah: Avoid
updating new regions from start of evacuation", but now with a fence to
ensure that preceding updates of regions are indeed visible to threads
before they see the watermark going down.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8240873
Webrev:
http://cr.openjdk.java.net/~rkennke/JDK-8240873/webrev.00/

Testing: hotspot_gc_shenandoah, specjbb2015, some specjvm workloads

Can I please get a review?

Thanks,
Roman




More information about the hotspot-gc-dev mailing list