RFR: Move barriers into typeArrayOop.hpp direct memory accessors
Aleksey Shipilev
shade at redhat.com
Sat Feb 17 08:58:46 UTC 2018
On 02/16/2018 03:23 PM, Aleksey Shipilev wrote:
> On 02/16/2018 02:01 PM, Roman Kennke wrote:
>> I propose to place pessimistic write barriers into those accessors for
>> now, and remove all the barriers in callers. The potential performance
>> loss seems the less evil compared to corrupted memory due to missing
>> barriers.
>
> Yes, that makes sense. On the other hand, pre-copying the arrays before doing the native accesses to
> them probably simplifies pinning.
>
>> http://cr.openjdk.java.net/~rkennke/typearray-barriers/webrev.00/
Apparently, this breaks release builds:
shenandoah-jdk10/build/src/hotspot/share/oops/typeArrayOop.hpp: In member function ‘jbyte*
typeArrayOopDesc::byte_at_addr(int) const’:
/pool/buildbot/slaves/sobornost/shenandoah-jdk10/build/src/hotspot/share/oops/typeArrayOop.hpp:53:80:
error: invalid conversion from ‘const oopDesc*’ to ‘oop {aka oopDesc*}’ [-fpermissive]
typeArrayOop p = typeArrayOop(BarrierSet::barrier_set()->write_barrier(this));
^
-Aleksey
More information about the shenandoah-dev
mailing list