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

[TESTBUG] DefaultFormat does not properly detect "JNI global refs" line in jstack output

    Details

    • Type: Bug
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 14
    • Fix Version/s: tbd
    • Component/s: core-svc
    • Labels:

      Description

      In open/test/hotspot/jtreg/serviceability/tmtools/jstack/utils/DefaultFormat.java, jniGlobalRefInfoPattern() is incorrect. It's suppose to match something like:

          JNI global refs: 9, weak refs:

      But instead it tries to match on "references" instead of "refs". The end result is messages like the following in the .jtr file when running the 6 jstack tests that use DefaultFormat:

          [Warning] Unknown string: JNI global refs: 9, weak refs: 0

      This also means that JStack.setJniGlobalReferences() is never being called, but since JStack.getJniGlobalReferences() is never used, there is no harm. However, since the functionality for parsing the "JNI global refs" line is there, it would be nice to fix it.

           protected String jniGlobalRefInfoPattern() {
      - return "^JNI\\sglobal\\sreferences:\\s((.+))$";
      + return "^JNI\\sglobal\\srefs:\\s((.+))$";
           }

        Attachments

          Activity

            People

            • Assignee:
              lcable Larry Cable
              Reporter:
              cjplummer Chris Plummer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: