On Tue, 16 Mar 2021 00:41:25 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> That looks fine, although I'm a little unclear about the need for 
> `--disableregistry`, and how that applies to existing code.

We can use it when we want to register SA endpoint to RMI registry that exists 
(e.g. rmid). I think it is simple to proxy to 
`sun.jvm.hotspot.rmi.startRegistry` like `--registryport` option in jhsdb.

https://github.com/openjdk/jdk/blob/master/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java#L392-L400

> Also, I think a bit of explanation of `[:registryport]` is needed since it is 
> not also specified by the `jhsdb debugd` command. That's just the port that 
> it chooses to communicate over, and can be any available port, right? If one 
> is not specified, what port is chosen, and what would be a reason that you 
> would want to specify a port?

We can specify any available port as you said.
For example, if we run multiple debugd instances on same OS, we need to use 
different port. We can use `--registryport` and `[:registryport]` in that case.
However we will not have many opportunities to use this.

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

PR: https://git.openjdk.java.net/jdk/pull/3000

Reply via email to