RFR: 8186838: Generalize Atomic::inc/dec with templates

David Holmes david.holmes at oracle.com
Thu Sep 7 02:10:59 UTC 2017


<trimming>

On 5/09/2017 10:09 PM, Erik Österlund wrote:
> Okay, great. So far it sounds like as for Atomic::inc/dec, there are no 
> loud voices against the idea of removing the Atomic::inc/dec 
> specializations. So I propose this new webrev that does exactly that.
> 
> Full webrev:
> http://cr.openjdk.java.net/~eosterlund/8186838/webrev.01/
> 
> Incremental over last webrev:
> http://cr.openjdk.java.net/~eosterlund/8186838/webrev.00_01/
> 
> I hope this looks simpler.

Yes this is much simpler.

I am still totally dismayed by the complexity that was needed to retain 
the inc/dec specializations. To me it just screams that there is 
something fundamentally wrong with what was being done. :(

I'm also somewhat perplexed. I can't read inline assembly fluently, but 
looking at the existing inc_ptr implementations, eg for x86, I'm not 
seeing code that adds 1*sizeof(*dest). ??

Thanks,
David

> Thanks,
> /Erik


More information about the hotspot-dev mailing list