c2: logic that drops write barrier projection is not accurate
Roman Kennke
rkennke at redhat.com
Wed Sep 21 12:55:59 UTC 2016
Am Mittwoch, den 21.09.2016, 14:41 +0200 schrieb Roland Westrelin:
> I think the logic that removes a write barrier projection when it has
> not read or write barrier use is broken: it stops at a MergeMem but
> it's
> not sufficient. Behind the MergeMem there could be a barrier (igvn
> would
> change that barrier's memory to bypass the MergeMem but there's no
> guarantee the barrier is processed before the write barrier for which
> we
> remove the projection), but also a not yet inlined call, an
> allocation,
> memory barrier, lock/unlock code or arraycopy that will later be
> removed. A following read barrier could then float above the write
> barrier.
Sounds like a possible scenario.
> I haven't found a satisfying way to fix this and removing that logic
> doesn't seem to cause a performance regression so I'd like to remove
> it,
> at least for now:
>
> http://cr.openjdk.java.net/~roland/shenandoah/always-keep-wb-proj/web
> rev.00/
Ok.
Roman
More information about the shenandoah-dev
mailing list