RFR: 8318026: jcmd should provide access to low-level JVM debug information
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Feb 27 01:35:44 UTC 2024
On Wed, 31 Jan 2024 14:22:44 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
> Introduce the jcmd "VM.debug" to implement access to a useful set of the established debug.cpp utilities, with "jcmd PID VM.debug subcommand ...".
>
> Not recommended for live production use. Calling these "debug" utilities, and not including them in the jcmd help output, is to remind us they are not general customer-facing tools.
Kevin, thank you for working on this! I've posted several comments/questions.
src/hotspot/share/services/diagnosticCommand.cpp line 1200:
> 1198: void VMDebugDCmd::find() {
> 1199: if (!_arg1.has_value()) {
> 1200: output()->print_cr("missing argument");
I'm thinking if it would be useful to tell what arguments are expected? This is for all cases where the `"missing argument"` message is returned.
src/hotspot/share/services/diagnosticCommand.cpp line 1245:
> 1243: }
> 1244: } else if (strcmp("find", _subcommand.value()) == 0) {
> 1245: if (!UnlockDiagnosticVMOptions) {
Would it make sense to require enabling `UnlockDiagnosticVMOptions` for all sub-commands, so that it is clear this is not for live production use?
-------------
PR Review: https://git.openjdk.org/jdk/pull/17655#pullrequestreview-1902349676
PR Review Comment: https://git.openjdk.org/jdk/pull/17655#discussion_r1503520152
PR Review Comment: https://git.openjdk.org/jdk/pull/17655#discussion_r1503518811
More information about the serviceability-dev
mailing list