diff options
author | 2020-11-10 14:58:06 -0800 | |
---|---|---|
committer | 2020-11-18 14:55:25 +0000 | |
commit | a5c1a82dc072fe29ff4d71a1abc88d713752323f (patch) | |
tree | dbdb5ccd0c9d23f5b609381bca1fbceb901f7889 /compiler/optimizing/optimizing_unit_test.h | |
parent | dc75b3f0d2f7363ad7a7f9356bc931486e17e4f5 (diff) |
Implement Reference.refersTo()
Avoid Reference.get(), so that we
a) Don't block for the GC when weak ref access is disabled.
b) Don't preserve a referent just because we compared to it.
Strengthen ConcurrentCopying::Copy memory ordering guarantees to make
this possible. In the process, weaken the existing fence to a
constructor fence, which should sometimes be slightly cheaper than
a release fence, which will be implemented as a full fence on ARM.
While looking at forwarding reference memory ordering, removed a
long identified unnecessary seq_cst memory access in
IsNullOrMarkedHeapReference.
Test: boot AOSP, atest ReferenceTest in libcore
Bug: 172573708
Change-Id: Ie716df684be94006353a54226f85ea93a7254b6c
Diffstat (limited to 'compiler/optimizing/optimizing_unit_test.h')
0 files changed, 0 insertions, 0 deletions