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

Some of the checked JNI improvements are excessively verbose

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 8u60, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:

      Backports

        Description

        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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

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