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

Some of the checked JNI improvements are excessively verbose

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • 8u60, 9
    • hotspot

        Propose the introduction of "-Xcheck:jniverbose" and move some of the more expensive and verbose "-Xcheck:jni" features into the "jniverbose".

        8043224: -Xcheck:jni improvements to exception checking and excessive local refs

        Adds warnings for every time the user has not checked for pending exceptions, the warnings are emitted for every call site, even when is no pending exception. This as caused some grief with code that may make a single check for batches of calls, excessive warnings are produced, this leads to testing timeouts in some cases.

        6311046: -Xcheck:jni should support checking of GetPrimitiveArrayCritical

        The guarded memory checks here are very expensive for high throughput, like AWT event testing, it's been causing timeouts.

        Folks in the wild are also affected, e.g.: https://community.oracle.com/thread/3783234

        Behavior changes:

        -Xcheck:jni:
        * check_exceptions should only warn if there is a pending exception (same as previous to 8043224)
        * guarded memory not used (same as previous to 6311046)

        -Xcheck:jniverbose:
        * check_exceptions complains pedantically for every unchecked call, as-per 8043224
        * guarded memory used as per 6311046

              dsimms David Simms
              dsimms David Simms
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified