RFR: 8263635: Add --servername option to jhsdb debugd [v3]
Chris Plummer
cjplummer at openjdk.java.net
Thu May 20 01:25:40 UTC 2021
On Sat, 15 May 2021 02:00:15 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> `jhsdb debugd` supports server name prefix with `sun.jvm.hotspot.rmi.serverNamePrefix` system property. It will be used as remote name for SA RMI object. It is "SARemoteDebugger" by default.
>>
>> As a result, remote name will be constructed as following:
>>
>>
>> //host[:port]/<serverNamePrefix>['_'<id>]
>>
>>
>> However we have no way to set it excepting system property. jhsdb should provide the way to set it as a command line option.
>>
>> serverNamePrefix is used for RMI object name, so "server name" is more suitable for it. Thus I will add `--servername` to `jhsdb debugd` for this purpose.
>> And also we should add the way to specify it when we connect to debug server. I will add it like `--connect id at server:1234/servername`.
>>
>> I've also filed [CSR for this PR](https://bugs.openjdk.java.net/browse/JDK-8265897). Please review it.
>> This PR modifies DisableRegistryTest.java, but it has been addressed in ProblemList-zgc.txt now. So this PR does not affect ZGC.
>
> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>
> 8263635: Add --servername option to jhsdb debugd
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java line 94:
> 92:
> 93: private static boolean debugdHelp() {
> 94: System.out.println(" --serverid <id> A unique identifier for this debug server.");
"debugd server" instead of "debug server"
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java line 105:
> 103: " 'java.rmi.server.hostname'. If not specified, the system property is used. If the system" +
> 104: " property is not set, a system hostname is used.");
> 105: System.out.println(" --servername <name> Instance name of debugd server.");
I think this should go right below `--serverid` above
src/jdk.hotspot.agent/share/man/jhsdb.1 line 206:
> 204: Sets the instance name of debugd server to distinguish SA debugee.
> 205: It is used for RMI object name for server instance.
> 206: If not specified, "SARemoteDebugger" will be set.
"will be used"
-------------
PR: https://git.openjdk.java.net/jdk/pull/3669
More information about the serviceability-dev
mailing list