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

Add clhsdb "findsym" command

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      This is a new command for clhsdb. It won't impact existing users except for an additional line of output when the "help" command is used.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      Add clhsdb "findsym" command to map a native symbol name to its address.

      Problem

      Clhsdb currently provides no way to map a native symbol to its address. This can be very useful for doing things like examining hotspot global variables.

      Solution

      Provide a "findsym" command that will map a native symbol to its address. The contents of the address can the be looked at using the existing "examine" command. This is an example clhsdb session:

      hsdb> findsym MaxJNILocalCapacity
      0x00007f10a8343da0: /scratch/cplummer/ws/jdk/jdk.clean/build/linux-x64-slowdebug/images/jdk/lib/server/libjvm.so + 0x1d81da0
      hsdb> findpc 0x00007f10a8343da0
      Address 0x00007f10a8343da0: MaxJNILocalCapacity
      hsdb> examine 0x00007f10a8343da0
      0x00007f10a8343da0: 0x0000000000010000 

      And 0x10000 is the default value for MaxJNILocalCapacity as seen in globals.hpp.

      Specification

      The clhsdb "help" output will include an entry for this new command:

      hsdb> help
      Available commands:
      ...
        findpc address
        findsym name
      ...
      hsdb> help findsym
      Usage: findsym name

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cjplummer Chris Plummer
              Reporter:
              cjplummer Chris Plummer
              Reviewed By:
              Alex Menkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: