RFR: Store verification

Roman Kennke rkennke at redhat.com
Thu Oct 20 13:48:39 UTC 2016


This change implements (extends+improves in case of AArch64) store
validation for Shenandoah. The idea is to insert a check at every store
in assembly level that verifies (for stores to heap):

- that the target address is not in the collection set, ever
- in case of oop stores, that the store-value is not in collection set,
but only during marking

This is very useful when the write-barrier is not obviously next to the
store, e.g. for c1 and c2. Infact, I left out the store-checks for the
intepreter stores because the check would always be right next to the
write-barrier. It's also inserted whereever objects are used for
locking (e.g. writes to the mark-word).

This is implemented in the interpreter (locks-only), c1 and c2 (x86-
only for now, see below), for both AArch64 and x86. There has been a
similar check already implemented in aarch64. This patch improves it
such that it can be inserted anywhere (regardless if rscratch1+2 are
available).

I have not yet implemented store-checks in x86_64.ad yet, because I
couldn't figure out how/where to insert the necessary MacroAssembler
calls. Roland: maybe you could have a look?

In aarch64, I added two methods to the assembler: get_cflags(Register)
and set_cflags(Register), they are used to save/restore the condition
flags. If we don't do this, we run into failures in tiered level 3.
Apparently it mixes condition-setting/using instructions with stores in
a funny way.

Store-checks are turned on via -XX:+ShenandoahStoreCheck.

Store-checks are now equivalent in x86 and aarch64.

http://cr.openjdk.java.net/~rkennke/storechecks/webrev/

Ok to push?

Roman


More information about the shenandoah-dev mailing list