RFR(M): 8181211: C2: Use profiling data to optimize on/off heap unsafe accesses
paul.sandoz at oracle.com
Wed May 31 16:42:43 UTC 2017
> On 31 May 2017, at 01:54, Roland Westrelin <rwestrel at redhat.com> wrote:
> Hi Paul,
>> A further clean up of the ByteBuffer code is to unify heap and direct
>> implementations to consistently use the double addressing mode, where
>> for the latter a null from a field is read and passed for the heap
>> object. We conservatively held off doing that due to performance
>> concerns. Do you think your patch will help here too?
> It would help if the application either only uses on heap accesses or
> off heap accesses. A mix of the two would cause profile pollution and
> a performance drop.
> MethodHandles.byteBufferViewVarHandle() shares one implementation for
> both off and on heap accesses, right? AFAICT, it is subject to that
Yes, it avoided the profile pollution induced by virtual calls to multiple buffer implementations by accessing common state, but at the cost of taking a hit on uniformly reading the heap object value from a field. So i suspect your patch might be marginally improve things in certain cases?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the hotspot-compiler-dev