Re: how to replace Unsafe.objectFieldOffset in jdk 11

2019-07-17 Thread Vitaly Davidovich
VarHandle does provide suitable (and better) replacements for the various Unsafe.get/putXXX methods. But, U.objectFieldOffset() is the only (easy?) Java way to inspect the layout of a class; e.g. say you apply a hacky class-hierarchy based cacheline padding to a field, and then want to assert

Re: Release fence pollution in constructors and builders

2019-07-17 Thread Andriy Plokhotnyuk
Hi Aleksey, Thanks for your fast response! Now I see that all these usages of fences are for better, but on another side when combined they lead to the slowdown of the throughput for single-thread code greatly... And I feel a little panic when seeing ~1.5x times drop of performance for Scala

Re: Release fence pollution in constructors and builders

2019-07-17 Thread Aleksey Shipilev
On 7/17/19 9:06 AM, Andriy Plokhotnyuk wrote: > 1) Using of release (and sometime store-store) fences in all constructors in > GraalVM: >