RFR: 8338894: Deprecate jhsdb debugd for removal [v3]

Kevin Walls kevinw at openjdk.org
Wed Sep 4 11:13:18 UTC 2024


On Wed, 4 Sep 2024 11:02:55 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> Deprecation annotations and warnings on starting the tool(s).
>> Handle man page in a separate issue.
>
> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - --connect message
>  - Test updates for --connect

Updated, including tests as the new --connect warning needs to be ignored.
We were using OutputAnalyzer's stderrShouldBeEmptyIgnoreDeprecatedWarnings() but it's specifically ignoring ".* VM warning:.* deprecated.*".  These changes are easy to find and revert when removal happens.

Alan you mention "warnings in the --help output", I still have a warning in the middle of the help text here, I tried it elsewhere but liked having the warning about --connect next to where --connect is mentioned in the help.

It seems like unnecessary additional changes would be needed to enable the common argument helper method to know what command is being invoked to make the --connect message specific to jhsdb jstack --connect etc.  Also one message to check for in tests.  


Updated messages:


bash-4.2$ build/linux-x64/images/jdk/bin/jhsdb
    clhsdb              command line debugger
    hsdb                ui debugger
    debugd --help       to get more information (deprecated)
    jstack --help       to get more information
    jmap   --help       to get more information
    jinfo  --help       to get more information
    jsnap  --help       to get more information



bash-4.2$ build/linux-x64/images/jdk/bin/jhsdb debugd --help
WARNING: debugd is deprecated and will be removed in a future release.
    --serverid <id>         A unique identifier....
```	

	

bash-4.2$ build/linux-x64/images/jdk/bin/jhsdb debugd --pid 123
WARNING: debugd is deprecated and will be removed in a future release.
Attaching to process ID 123 and starting RMI services, please wait...





bash-4.2$ build/linux-x64/images/jdk/bin/jhsdb jstack --help
    --locks                 To print java.util.concurrent locks.
    --mixed                 To print both Java and native frames (mixed mode).
    --pid <pid>             To attach to and operate on the given live process.
    --core <corefile>       To operate on the given core file.
    --exe <executable for corefile>
    --connect [<serverid>@]<host>[:registryport][/servername] To connect to a remote debug server (debugd).

WARNING: --connect is deprecated and will be removed in a future release.

    The --core and --exe options...
```	
	

bash-4.2$ build/linux-x64/images/jdk/bin/jhsdb jstack --connect serverid at debugserver:1234/servername
WARNING: --connect is deprecated and will be removed in a future release.
Attaching to remote server serverid at debugserver:1234/servername, please wait...

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20830#issuecomment-2328617682


More information about the serviceability-dev mailing list