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

[lworld] nmethod assembly snippet in hs_err file misses method name and parameters

XMLWordPrintable

      New test runtime/ErrorHandling/MachCodeFramesInErrorFile.java added in last merge with main line is failing:

      java.lang.RuntimeException: 0 < 2
      at jdk.test.lib.Asserts.fail(Asserts.java:594)
      at MachCodeFramesInErrorFile.run(MachCodeFramesInErrorFile.java:161)
      at MachCodeFramesInErrorFile.main(MachCodeFramesInErrorFile.java:105)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:833)


      The test fails when parsing the hs_error file, trying to recognize a particular pattern.

      The test is using this expression:

              Matcher matcher = Pattern.compile("\\[MachCode\\]\\s*\\[Verified Entry Point\\]\\s* # \\{method\\} \\{[^}]*\\} '([^']+)' '([^']+)' in '([^']+)'", Pattern.DOTALL).matcher(hsErr);

      to look for the following kind of sequence in the hs_error file:

      [MachCode]
      [Verified Entry Point]
        # {method} {0x00007f8694401bf8} 'crashInJava3' '(J)V' in 'MachCodeFramesInErrorFile$Crasher'


      With Valhalla, the output in the hs_error file is quite different:

      [MachCode]
      [Entry Point]
      [Inline Entry Point]
      [Verified Entry Point]
      [Verified Inline Entry Point]
      [Verified Inline Entry Point (RO)]
       ;; N1: # out( B1 ) <- in( B5 B4 B8 ) Freq: 1
       ;; B1: # out( B5 B2 ) <- BLOCK HEAD IS JUNK Freq: 1


      and doesn't match the expression expected by the test.

            thartmann Tobias Hartmann
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: