Request for reviews (S): 7190310: Inlining WeakReference.get(), and hoisting $referent may lead to non-terminating loops
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Aug 9 23:01:07 PDT 2012
On 08/10/2012 09:33 AM, Aleksey Shipilev wrote:
> On 08/10/2012 05:34 AM, Vladimir Kozlov wrote:
>> http://cr.openjdk.java.net/~kvn/7190310/webrev
>>
>> 7190310: Inlining WeakReference.get(), and hoisting $referent may lead
>> to non-terminating loops
>>
>> Add acquire membar after load from Reference.referent field to prevent
>> commoning of loads across safepoint since GC can change its value.
>
> Cool! Code looks fine. Let me check the disassembly and the effects for
> the original testcase.
Confirmed. $referent is not commoned from the busy loop, and the
expected behavior is now hapenning in C2. Thanks!
-Aleksey.
More information about the hotspot-compiler-dev
mailing list