[jdk19] RFR: 8289302: Restore CriticalJNINatives

Martin Doerr mdoerr at openjdk.org
Thu Jun 30 13:25:43 UTC 2022


On Wed, 29 Jun 2022 15:27:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> > What is the panama take on this?
> 
> At some point Panama provided support for "trivial" calls, e.g. native calls whose Java -> native transition was elided. In more recent iterations of the API we ended up leaving that "feature" on the side: it only provided very limited boost (e.g. ~4-5 ns) and at great cost in terms of risks (e.g. if the native call upcalls back to Java a JVM crash is unavoidable).
> 
> As pointed out elsewhere [1, 2], a much better way to support this kind of use cases is through new intrinsics, as JVM intrinsics would avoid the typical costs associated with a native call (critical or not).
> 
> [1] - https://mail.openjdk.org/pipermail/panama-dev/2022-June/017048.html [2] - https://mail.openjdk.org/pipermail/panama-dev/2022-June/017050.html

Did you check the performance boost on a multi-socket machine? Impact is significantly larger than on single-chip systems. We had experimented with CriticalJNINatives on large x86_64 and ppc64 servers.

-------------

PR: https://git.openjdk.org/jdk19/pull/90


More information about the hotspot-dev mailing list