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

Print the names of callees in PrintAssembly/PrintInterpreter

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • hotspot
    • b103
    • generic
    • generic

      In -XX:+PrintAssembly and -XX:+PrintInterpreter, sometimes only the address of a callee is printed, and the name is missing.

      We should use os::dll_address_to_function_name() to find the names of such functions and print them out if possible. The following is example. Note that the " = <func_name>" is the proposed new output.

      $ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintInterpreter
      <....>
      ----------------------------------------------------------------------
      newarray 188 newarray [0x00007f1b01844780, 0x00007f1b01844860] 224 bytes

        0x00007f1b01844780: mov (%rsp),%eax
        0x00007f1b01844783: add $0x8,%rsp
        0x00007f1b01844787: movzbl 0x1(%r13),%esi
        0x00007f1b0184478c: callq 0x00007f1b01844796
        0x00007f1b01844791: jmpq 0x00007f1b0184482c
        0x00007f1b01844796: mov %rax,%rdx
        0x00007f1b01844799: lea 0x8(%rsp),%rax
        0x00007f1b0184479e: mov %r13,-0x38(%rbp)
        0x00007f1b018447a2: mov %r15,%rdi
        0x00007f1b018447a5: mov %rbp,0x1e0(%r15)
        0x00007f1b018447ac: mov %rax,0x1d0(%r15)
        0x00007f1b018447b3: test $0xf,%esp
        0x00007f1b018447b9: je 0x00007f1b018447d1
        0x00007f1b018447bf: sub $0x8,%rsp
        0x00007f1b018447c3: callq 0x00007f1b19b9bba0 = InterpreterRuntime::newarray(JavaThread*, BasicType, int)
        0x00007f1b018447c8: add $0x8,%rsp
        0x00007f1b018447cc: jmpq 0x00007f1b018447d6
        0x00007f1b018447d1: callq 0x00007f1b19b9bba0 = InterpreterRuntime::newarray(JavaThread*, BasicType, int)
        0x00007f1b018447d6: mov $0x0,%r10
        0x00007f1b018447e0: mov %r10,0x1d0(%r15)
      <....>


      $ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
      <....>
        0x00007f75d87b9629: xchg %ax,%ax
        0x00007f75d87b962b: callq 0x00007f75d0c11b60 ; ImmutableOopMap{rbp=Oop }
                                                      ;*iflt {reexecute=1 rethrow=0 return_oop=0}
                                                      ; - java.lang.StringLatin1::charAt@1 (line 43)
                                                      ; {runtime_call UncommonTrapBlob}
        0x00007f75d87b9630: callq 0x00007f75e8e41370 = os::breakpoint()
                                                      ;*iflt {reexecute=0 rethrow=0 return_oop=0}
                                                      ; - java.lang.StringLatin1::charAt@1 (line 43)
                                                      ; {runtime_call}
        0x00007f75d87b9635: hlt
        0x00007f75d87b9636: hlt
      <....>

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: