RFR(XS): 8176513 Poor code quality for ByteBuffers
vladimir.x.ivanov at oracle.com
Wed Mar 15 15:08:04 UTC 2017
> Good for JDK 9. Since Vladimir I. suggested the fix I assume he reviewer
> Roland, did you get ByteBuffers some performance back?
> I will need to run pre-integration testing before pushing.
FYI I've just submitted the test batch.
Slightly adjusted the fix as well:
- need_mem_bar = mismatched || can_access_non_heap;
+ need_mem_bar = mismatched && !adr_type->isa_aryptr();
> On 3/15/17 2:48 AM, Roland Westrelin wrote:
>> 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