JDK-8223814 : SA: jhsdb common help needs to be more detailed
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-14
  • Updated: 2020-07-02
  • Resolved: 2019-05-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.5Fixed 13 b23Fixed 14Fixed
Related Reports
Blocks :  
Relates :  
Description
A number of jhsdb subcommands accept a subset of the same command-line parameters - a pid or else an executable and optionally a core file. These commands share a common help method which simply reports:

    --exe       executable image name
    --core      path to coredump
    --pid       pid of process to attach

This doesn't make it clear that "pid" and "exe" are mutually exclusive, or that "core" only goes with "exe". It also doesn't tell you whether names/paths can be absolute or relative etc.

The standalone tools (jstack, jinfo, jmap etc) used to provide much clearer usage information in their help output e.g. jstack from 8:

Usage:
    jstack [-l] <pid>
        (to connect to running process)
    jstack -F [-m] [-l] <pid>
        (to connect to a hung process)
    jstack [-m] [-l] <executable> <core>
        (to connect to a core file)
    jstack [-m] [-l] [server_id@]<remote server IP or hostname>
        (to connect to a remote debug server)

Options:
    -F  to force a thread dump. Use when jstack <pid> does not respond (process is hung)
    -m  to print both java and native frames (mixed mode)
    -l  long listing. Prints additional information about locks
    -h or -help to print this help message

while the SA commands don't necessarily have the exact same functionality as the standalone commands, the help/usage information could be clearer.


Comments
Fix Request for 11u: This change is needed to backport JDK-8209790 to 11u. It changes the help messages only, so the impact is very low.
23-07-2019

The patch has been proposed by Osamu Sakamoto <sakamoto.osamu@nttcom.co.jp> http://mail.openjdk.java.net/pipermail/serviceability-dev/2019-May/028199.html
27-05-2019

It is more clear to use angle brackets around parameters. Also, it is better to clarify about full and relative path. So that, instead of: --exe executable image name --core path to coredump --pid pid of process to attach it should look like: --exe <full or relative path to executable image name> --core <full or relative path to coredump> --pid <pid of process to attach>
16-05-2019

Not sure correct component/subcomponent for this.
14-05-2019