JDK-8254694 : Deprecate -XX:+CriticalJNINatives flag which implements JavaCritical native functions
  • Type: CSR
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 16
  • Submitted: 2020-10-13
  • Updated: 2020-10-16
  • Resolved: 2020-10-16
Related Reports
CSR :  
Description
Summary
-------

Deprecate the option -XX:+CriticalJNINatives which implements the feature where a native function is replaced with one that is prefixed with JavaCritical_.  This feature decomposes primitive arrays and pins them so that GC doesn't move them so that the native code can read them.

Problem
-------

This was an internal optimization that was used for the Solaris/sparc crypto functions and is no longer used by the JDK.  The optimization is known externally and was tried for native arguments with no parameters.  This usage will be replaced with Panama.  We will probably want to delay removing the option until Panama is generally available.

This optimization is not available on all platforms (aarch64).

Solution
--------

The -XX:+CriticalJNINatives option will be turned off by default and will issue a deprecation message if used.

Specification
-------------

   product(bool, CriticalJNINatives, false, 
               "(Deprecated) Check for critical JNI entry points")


Comments
Moving to Approved.
16-10-2020