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

Help-info for pns(...) on Linux/mips lost

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • 9, 10, 11, 12
    • hotspot
    • None
    • 9
    • b10
    • other
    • generic

      When debug the VM in gdb and perform "call help()", the output is
      -------------------------------------------------
      (gdb) call help()

      "Executing help"
      basic
        pp(void* p) - try to make sense of p
        pv(intptr_t p)- ((PrintableResourceObj*) p)->print()
        ps() - print current thread stack
        pss() - print all thread stacks
        pm(int pc) - print Method* given compiled PC
        findm(intptr_t pc) - finds Method*
        find(intptr_t x) - finds & prints nmethod/stub/bytecode/oop based on pointer into it
        pns(void* sp, void* fp, void* pc) - print native (i.e. mixed) stack trace. E.g.
                         pns($sp, $rbp, $pc) on Linux/amd64 and Solaris/amd64 or
                         pns($sp, $ebp, $pc) on Linux/x86 or
                         pns($sp, 0, $pc) on Linux/ppc64 or
                         pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC
                       - in gdb do 'set overload-resolution off' before calling pns()
                       - in dbx do 'frame 1' before calling pns()
      misc.
        flush() - flushes the log file
        events() - dump events from ring buffers
      compiler debugging
        debug() - to set things up for compiler debugging
        ndebug() - undo debug
      -------------------------------------------------

      The help-info for pns(...) on Linux/mips is lost.
      However, it exists in jdk8u.

      To support debugging on as many platforms as possible, it would be better to keep it.
      This can be fixed by the following patch:
      -------------------------------------------------
      diff -r df3d253aaf81 src/hotspot/share/utilities/debug.cpp
      --- a/src/hotspot/share/utilities/debug.cpp Wed Feb 27 02:49:52 2019 +0000
      +++ b/src/hotspot/share/utilities/debug.cpp Wed Feb 27 15:33:31 2019 +0800
      @@ -643,6 +643,7 @@
         tty->print_cr(" pns($sp, $rbp, $pc) on Linux/amd64 and Solaris/amd64 or");
         tty->print_cr(" pns($sp, $ebp, $pc) on Linux/x86 or");
         tty->print_cr(" pns($sp, 0, $pc) on Linux/ppc64 or");
      + tty->print_cr(" pns($sp, $s8, $pc) on Linux/mips or");
         tty->print_cr(" pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC");
         tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()");
         tty->print_cr(" - in dbx do 'frame 1' before calling pns()");
      -------------------------------------------------

            jiefu Jie Fu
            jiefu Jie Fu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: