RFR: JDK-8210656: Object equals abstraction for BarrierSetC2
rkennke at redhat.com
Wed Sep 12 20:11:51 UTC 2018
This introduces an abstraction to deal with object equality in
BarrierSetC2. This is needed by GCs that can have different copies of
same objects alive like Shenandoah.
The approach chosen here is slightly different than we did in e.g.
BarrierSetAssembler and the runtime Access API: instead of owning the
whole equality, it only provides a resolve-like method to resolve the
operands to stable values. The reason for doing this is that it's easier
to do this way in intrinsics if those barriers are detached from the
actual CmpP. This is because the barriers create new memory states, and
we'd have to create memphis around those things, which is considerably
I chose to add a new resolve_for_obj_equals(a, b) method instead of
using two calls to resolve(a); resolve(b); because this allows for
optimization: if any of a or b is known to be NULL, we can elide
barriers for both. This is not possible to do with two independent
Testing: passes hotspot/jtreg:tier1
What do you think about this?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the hotspot-gc-dev