RFR: 8197454: Need Access decorator for storing oop into uninitialized location
Kim Barrett
kim.barrett at oracle.com
Mon Feb 12 16:49:05 UTC 2018
> On Feb 12, 2018, at 9:16 AM, Erik Österlund <erik.osterlund at oracle.com> wrote:
>
> Hi Kim,
>
> Looks good.
Thanks, Erik.
> This decorator was renamed to have the ARRAYCOPY_ prefix after discovering it was only used by arraycopy. But if you have a different use case that needs to perform stores on uninitialized memory, then I support this change.
This came up while Access-orizing JNI. The couple of places where this was needed for
JNI could instead do a raw store of NULL followed by a normally barriered oop_store.
It seemed clearer to make this change in order to be explicit about the semantics.
> Thanks,
> /Erik
>
> On 2018-02-11 08:25, Kim Barrett wrote:
>> Please review this change to the Access API to support stores of oops
>> into uninitialized locations. This change is needed to prevent such
>> stores from, for example, having the G1 pre-barrier applied to
>> whatever garbage happens to be in the location being stored into.
>>
>> There was already support for stores to uninitialized locations in the
>> Access API, but only for array initialization. This change
>> generalizes that mechanism, and renames it accordingly:
>> ARRAYCOPY_DEST_NOT_INITIALIZED => AS_DEST_NOT_INITIALIZED.
>>
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8197454
>>
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8197454/open.00/
>>
>> Testing:
>> Mach5 {hs,jdk}-tier{1,2,3}
More information about the hotspot-dev
mailing list