Question: JNI critical native support is not fully implemented for AArch64?

Pengfei Li Pengfei.Li at arm.com
Thu Dec 19 07:42:38 UTC 2019


Hi,

JDK-8200388[1] reports an issue that JNI critical native support is not implemented on AArch64. I searched the code and found this feature has been supported by all other platforms OpenJDK has. I also found in the AArch64 version of SharedRuntime::generate_native_wrapper(), the main logic for generating critical native wrapper code is already there but some necessary helper classes/methods are missing - marked as "Unimplemented()" by adinn many years ago  - including these below.

- static void check_needs_gc_for_critical_native()
- static void unpack_array_argument()
- class ComputeMoveOrder: public StackObj {}

While I also see someone saying that this feature is designed for internal use only and there is no public specification for it[2]. And I don't know if there is any real workload currently using it. So could anyone tell me if "Critical Natives" is a sort of "public feature" of OpenJDK? And is there much value to complement the implementation for AArch64?

[1] https://bugs.openjdk.java.net/browse/JDK-8200388
[2] https://stackoverflow.com/questions/36298111/is-it-possible-to-use-sun-misc-unsafe-to-call-c-functions-without-jni

--
Thanks,
Pengfei



More information about the hotspot-runtime-dev mailing list