JDK-8261101 : Add clhsdb "findsym" command
  • Type: CSR
  • Component: hotspot
  • Sub-Component: svc-agent
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 17
  • Submitted: 2021-02-03
  • Updated: 2021-02-17
  • Resolved: 2021-02-17
Related Reports
CSR :  
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



Comments
Moving to Approved.
17-02-2021

Moving to Provisional.
05-02-2021