[jdk19] RFR: 8289302: Restore CriticalJNINatives
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 29 15:30:47 UTC 2022
On Wed, 29 Jun 2022 14:31:59 GMT, Robbin Ehn <rehn 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
-------------
PR: https://git.openjdk.org/jdk19/pull/90
More information about the hotspot-dev
mailing list