RFR: 8318026: jcmd should provide access to low-level JVM debug information [v8]

Serguei Spitsyn sspitsyn at openjdk.org
Tue Mar 26 20:57:31 UTC 2024


On Tue, 26 Mar 2024 17:01:49 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> Introduce the jcmd "VM.inspect" to implement access to detailed JVM object information.
>> 
>> Not recommended for live production use.  Requires UnlockDiagnosticVMOptions and not included in jcmd help output, to remind us this is not a general-purpose customer-facing tool.
>
> Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 20 additional commits since the last revision:
> 
>  - Change to jcmd VM.inspect
>  - Merge remote-tracking branch 'upstream/master' into 8318026_jcmd_VMdebug_command
>  - Test update
>  - Show description if unknown subcommand.
>  - Remove unnecessary 'events' subcommand.
>  - Usage correction
>  - Help to clarify this is VM inspection.  Comment to relate source to debug.cpp.
>  - jcheck trailing whitespace
>  - Test update omitted from previous commit.
>  - Merge remote-tracking branch 'upstream/master' into 8318026_jcmd_VMdebug_command
>  - ... and 10 more: https://git.openjdk.org/jdk/compare/0a4d6c74...739bcbfa

It looks good in general. Still need to review the test.

src/hotspot/share/services/diagnosticCommand.cpp line 59:

> 57: #include "runtime/jniHandles.hpp"
> 58: #include "runtime/os.hpp"
> 59: #include "runtime/threads.hpp"

Is the `#include` lines a leftover from the initial version? Do we still need them?

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

PR Review: https://git.openjdk.org/jdk/pull/17655#pullrequestreview-1961713172
PR Review Comment: https://git.openjdk.org/jdk/pull/17655#discussion_r1540097938


More information about the serviceability-dev mailing list