RFR (XXS): 8033545: Missing volatile specifier in Bitmap::par_put_range_within_word

Tony Printezis tprintezis at twitter.com
Wed Feb 5 17:31:46 UTC 2014


Looks good to me too. (And using the return value of the CAS is a nice 
fix IMHO.)

On 2/5/14, 4:43 AM, Bengt Rutisson wrote:
> Hi Thomas,
>
> Thanks for the extra information. Sounds good.
>
> Bengt
>
>> 5 feb 2014 kl. 10:35 skrev Thomas Schatzl <thomas.schatzl at oracle.com>:
>>
>> Hi Bengt,
>>
>>   thanks for the review.
>>
>>> On Wed, 2014-02-05 at 10:08 +0100, Bengt Rutisson wrote:
>>> Hi Thomas and Matthias,
>>>
>>> The change looks good.
>>>
>>> But just to be clear. The original suggestion was to make pw volatile,
>>> but instead you fixed it by using the return value of
>>> Atomic::cmpxchg_ptr(). I think that is fine, but I wanted to make sure
>> That's true, it has been solved differently, with the same effect.
>>
>> Atomic:cmpxchg_ptr() already returns the original value, so there is no
>> need to reload it from the source (using the volatile pointer).
>> That's actually a very common pattern in other uses.
>>
>> In the places I tracked down in the other CR this should (imo) be the
>> recommended way to fix the issues.
>>
>>> that I understood the fix properly. Or did I miss something? If my
>>> understanding is correct we should maybe update the CR with a comment
>>> saying that it was fixed in a different way.
>> Will do.
>>
>>> Thanks for filing the CR to track down similar issues.
>> Thanks,
>> Thomas
>>

-- 
Tony Printezis | JVM/GC Engineer / VM Team | Twitter

@TonyPrintezis
tprintezis at twitter.com




More information about the hotspot-gc-dev mailing list