RFR: 8263636: Add --disableregistry option to jhsdb debugd [v2]
Chris Plummer
cjplummer at openjdk.java.net
Mon Apr 5 21:03:18 UTC 2021
On Mon, 5 Apr 2021 00:27:35 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java line 89:
>>
>>> 87: if (canConnectToRemote) {
>>> 88: System.out.println(" or jhsdb " + mode + " --connect debugserver");
>>> 89: System.out.println(" or jhsdb " + mode + " --connect id at debugserver:1234");
>>
>> Your change here makes it look like if you specify `id@` then you also need to specify the port. I'd suggest also including the original line that just has `id at debugserver`.
>
> I reverted the original line in new commit.
>
> We can also specify port number without `id@` (e.g. `--connect debugserver:1234`). Is it ok not to describe on help message? IMHO it is not good to describe all patterns because it might be verbosely.
It's hard to say what's best here. You don't want to give examples that may be misleading, but in some cases including every possible example can become too verbose. It looks like there are 4 possible examples here; with and w/o `id` and with and w/o the port. Including 3 of the 4 makes me think you should just add the 1 missing one to make it complete. On the other hand, maybe you could go with just the `id at debugserver:1234` example and leave the other 3 off. The syntax does clearly show the `id` and port are optional.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3233
More information about the serviceability-dev
mailing list