On Thu, 1 Sep 2022 16:47:58 GMT, Robbin Ehn <r...@openjdk.org> wrote:
> Please consider, only implemented on x64/aarch64 linux/windows. > > On my box calling clock_gettime via JNI goes from 35ns to 28ns when enabled. > > Passes t1-7 with option forced on, also passes t1-4 as is in this PR. Nice to see usage of this OS feature. I like it more than the serialization page we have in 11u (with `-XX:-UseMembar`) and Critical JNI Natives (which still have some advantage). I have observed the same speedup for a trivial JNI call on my x86_64 machine. src/hotspot/os/linux/systemMemoryBarrier_linux.cpp line 36: > 34: // Syscall defined in kernel 4.3 > 35: #if !defined(SYS_membarrier) > 36: #define SYS_membarrier 324 I'd like to get rid of the platform checks in this generic linux file. This number seems to be the only platform specific part: ------------- PR: https://git.openjdk.org/jdk/pull/10123