RFR: Fix C1/Shenandoah/Conc-Partial pre-barrier
Roman Kennke
rkennke at redhat.com
Tue Oct 10 20:51:52 UTC 2017
Apparently, C1 doesn't deal well with nested control flows like this:
if (conc_mark_in_progress) {
if (satb_active) {
g1satbbarrierstub();
}
}
Aleksey found a crash where C1 would sneak in what looks like a spill
reg load after loading the satb_active field but before the actual
branch. This one is used later (after the barrier, even if it's not
branching out to the barrier stub). However, if we surround this by our
own control flow, we miss that spill reg load, and the use of this
register after the barrier makes it crash.
Turns out we don't actually need that double-checking code. We can use a
copy of the G1 barrier code with the satb_active check swapped out by
conc_mark_in_progress check. This fixes the crash and leads to less
branchy code.
http://cr.openjdk.java.net/~rkennke/fixc1prebarrier/webrev.00/
<http://cr.openjdk.java.net/%7Erkennke/fixc1prebarrier/webrev.00/>
Test: Aleksey's failing test
Good?
Roman
More information about the shenandoah-dev
mailing list