RFR: JDK-8231086: Shenandoah: Stronger invariant for object-arraycopy

Roman Kennke rkennke at redhat.com
Tue Sep 17 14:02:42 UTC 2019


Currently, arraycopy operations can cause temporary
from-space-references in the destination array. Those would be
subsequently updated by an arraycopy-post-barrier, but it's awkward
because this temporary from-space references need to be dealt with, e.g.
in the CAS-obj barrier, and a few other places.
We can update the src array before copying, and therefore ensure to
never see a from-space-reference in the dst array, ever. This opens up a
couple of opportunities for simplification and optimization.

The change depends on JDK-8231085, which is under review too:
http://cr.openjdk.java.net/~rkennke/JDK-8231085/webrev.00/

It removes the huge single-loop that has been used for runtime and
interpreter arraycopy, and makes all (c2, c1, interpreter, runtime) use
the same pre-barrier.

Jira issue:
https://bugs.openjdk.java.net/browse/JDK-8231086
Webrev:
https://bugs.openjdk.java.net/browse/JDK-8231086
Testing: hotspot_gc_shenandoah

Performance testing with specjvm showed no significant pessimizations,
and in few cases we came out around 7% improved.

I intend to push this together with JDK-8231085, once both are reviewed.

Can I please get a review?

Thanks,
Roman




More information about the hotspot-gc-dev mailing list