On Thu, 4 Apr 2024 12:46:26 GMT, Kevin Walls <kev...@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 incrementally with one additional 
> commit since the last revision:
> 
>   VMInspectTest update

Updating to change the "guard" flag.

I was proposing using a -XX "guard" flag at startup time, to enable jcmd 
VM.inspect, because it allows inspection of arbitrary pointers given by the the 
user.  With the improved dbg_is_good_oop I have not managed to cause any 
crashes, but using the guard flag is a cautious approach.

Will not use UnlockDiagnosticVMOptions as that is intended for command-line 
option processing.

Therefore a new -XX product flag: -XX:+UnlockDiagnosticVMFeatures which 
defaults to false and is true in debug builds.

While named similarly to UnlockDiagnosticVMOptions, that option is quite long 
established and well-documented with many search results, so we should not 
cause confusion.  The logic is that that option relates to enabling further 
command-line options, and the new option relates to diagnostic features in the 
VM at runtime.

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

PR Comment: https://git.openjdk.org/jdk/pull/17655#issuecomment-2043037830

Reply via email to