[10] RFR(M): 8176506: C2: loop unswitching and unsafe accesses cause crash

Paul Sandoz paul.sandoz at oracle.com
Thu Apr 20 17:59:36 UTC 2017


In addition to Andrew’s test i have a simple JMH microbenchmark i can send you, which i used to measure performance and identify issues with code generation, misalignment, and unrolled loops for byte buffer access (off/on heap) and VarHandle views. specjvm2008 is likely too coarse grained.

Paul.

> On 20 Apr 2017, at 06:06, Roland Westrelin <rwestrel at redhat.com> wrote:
> 
> 
>> But the real goal of that ByteBuffer test (and indeed all of the
>> ByteBuffer optimizations) is to provide access to raw memory "as fast
>> as C", and has implications for project Valhalla, etc.
> 
> In the case of the ByteBuffer test, with the changes I'm proposing there
> will be an extra null check to verify accesses are on heap. That null
> check will be out of loop so essentially free and there won't be any
> regression. Off heap accesses or a mix of on heap and off heap accesses
> in the same method would regress.
> 
> Roland.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170420/1fcf749b/signature.asc>


More information about the hotspot-compiler-dev mailing list