JDK-8177064: jcmd help command should not require the process identification

Thomas Stüfe thomas.stuefe at gmail.com
Thu Apr 11 18:52:20 UTC 2019


Hi Gary,

I am not sure this makes sense. jcmd can be used to access wildly different
VMs with different command sets, including Vendor-specific commands (we
have additional commands in the SapMachine, for instance). Also, jcmd is
up- and downward compatible, and you can run older jcmd versions against
newer VMs.

So I do not think the list of commands of the VM jcmd happens to run under
has any relation to the capabilities of the VMs one plans to attach to.

Cheers Thomas




On Thu, Apr 11, 2019 at 8:23 PM Gary Adams <gary.adams at oracle.com> wrote:

> Two years ago a request was made to allow
>
>     jcmd help
>
> to be interpretted as a request for help from the current jcmd process
> rather than requiring a separate target process to be involved.
>
> Some attempts were made to close the issue, because the
> command was not documented to work that way.
> It was also pointed out that the help from the running jcmd
> might not match the cmds available from a subsequent
> request to a different process possibly running a different version
> of the vm.
>
> As proof of concept exercise this webrev shows a minimal set of
> changes that could support
>
>    jcmd self help
>
> Before fleshing out additional changes in documentation and testing,
> I'd like to know if this is still a worth while enhancement. Also,
> I'd like to know more about the history of the checks preventing self
> attach.
>
>    Webrev: http://cr.openjdk.java.net/~gadams/8177064/webrev/index.html
>    Issue: https://bugs.openjdk.java.net/browse/JDK-8177064
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190411/36180c5a/attachment.html>


More information about the serviceability-dev mailing list