Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8254694

Deprecate -XX:+CriticalJNINatives flag which implements JavaCritical native functions

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 16
    • hotspot
    • None
    • behavioral
    • low
    • Users who have tried this option are using an unsupported feature of the JVM.
    • add/remove/modify command line option
    • JDK

      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")

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Daniel Daugherty, Robbin Ehn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: