[9] RFR(XS): 8176513 Poor code quality for ByteBuffers

Roland Westrelin rwestrel at redhat.com
Wed Mar 15 09:48:50 UTC 2017


This changes relaxes the condition under which MemBarCPUOrder nodes are
added around unsafe accesses. If the object being accessed is an array
and the access is mismatched, the current code add useless barriers
(there's only one memory slice for the entire array so no risk of
breaking alias analysis). If the base is not known to be not null,
membars are added as well. These membars are not added for arrays in 8u
and that hasn't caused any known problem. So in order to keep this
change simple, we propose removing that condition (this was suggested by
Vladimir Ivanov in the comments for this bug).


More information about the hotspot-compiler-dev mailing list