[14] RFR (S): 8226411: C2: Avoid memory barriers around off-heap unsafe accesses

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Fri Nov 29 17:18:30 UTC 2019


> Does it affect this:
> https://bugs.openjdk.java.net/browse/JDK-8220714

Good point, Roman. Proposed patch breaks the fix for JDK-8220714.

I'll investigate what happens there and come back with a revised fix.

Best regards,
Vladimir Ivanov

>> http://cr.openjdk.java.net/~vlivanov/8226411/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8226411
>>
>> There were a number of fixes in C2 support for unsafe accesses recently
>> which led to additional memory barriers around them. It improved
>> stability, but in some cases it was redundant. One of important use
>> cases which regressed is off-heap accesses [1]. The barriers around them
>> are redundant because they are serialized on raw memory and don't
>> intersect with any on-heap accesses.
>>
>> Proposed fix skips memory barriers around unsafe accesses which are
>> provably off-heap (base == NULL).
>>
>> It (almost completely) recovers performance on the microbenchmark
>> provided in JDK-8224182 [1].
>>
>> Testing: tier1-6.
>>
>> Best regards,
>> Vladimir Ivanov
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8224182
>>
> 


More information about the hotspot-compiler-dev mailing list