RFR: 8186166: Generalize Atomic::cmpxchg with templates
kim.barrett at oracle.com
Thu Aug 17 17:42:18 UTC 2017
> On Aug 17, 2017, at 1:30 PM, coleen.phillimore at oracle.com wrote:
> On 8/16/17 2:03 AM, Kim Barrett wrote:
>> New webrevs:
>> full: http://cr.openjdk.java.net/~kbarrett/8186166/hotspot.01/
>> incr: http://cr.openjdk.java.net/~kbarrett/8186166/hotspot.01.inc/
> I like the name change to cmpxchg_using_helper.
> Why does this have <byte_size> rather than the constants like the other platforms?
One definition for all cases. The other platforms have different (sometimes only very slightly) code in the specializations for the different sizes. In this case, it’s the same code, regardless of the size. So we don’t need multiple specializations, one for each specific size.
> Okay, seeing this change, I have to prefer the cast using union. That's super simple and disturbing in it's power. Thank you for the commentary before it.
> The incremental change looks good. I've reviewed this enough to be glad when it's pushed, once all the platforms are verified.
More information about the hotspot-dev