On Tue, 16 Dec 2025 20:43:14 GMT, Kevin Walls <[email protected]> wrote:

>> More context: https://openjdk.org/jeps/137
>> 
>>> 1-1 Overview
>>> 
>>> The diagnostic command framework is fully implemented in native code and 
>>> relies on HotSpot's internal exception mechanism. The rationale for a pure 
>>> native implementation is to be able to execute diagnostic commands even in 
>>> critical situations like an out-of-memory condition. All diagnostic 
>>> commands are registered in a single list, and two flags control the way a 
>>> user can interact with them. The hidden flag prevents a diagnostic command 
>>> from appearing in the list of available commands returned by the help 
>>> command. However, it's still possible to get the detailed help message for 
>>> a hidden command with the help <command name> syntax, but it requires 
>>> knowing the name of the hidden command. The second flag is enabled and it 
>>> controls whether a command can be invoked or not. When listed with the help 
>>> commands, disabled commands appear with a [disabled] label in their 
>>> descriptions. If the user tries to invoke a disabled command, an error 
>>> message is returned and the command is not run. Th
 is error message can be customized on a per-command basis. The framework just 
provides these two flags with their semantics; it doesn't provide any policy or 
mechanism to set or modify these flags. These actions will be delegated to the 
JVM or specific diagnostic commands.
>> 
>> The diagnostic command framework was developed at the same time we had 
>> requests to implement "Commercial features", the "enabled" flag might also 
>> have been intended to guard those commercial features (gone now).
>
> Thanks @fparain Frederic for the extra context.  Had wondered if this feature 
> had ever been used, particularly all the mechanism around the possible JMX 
> Notification.  After this change, we may look at whether it should be removed 
> also.

Thanks @kevinjwalls @fparain @kevinjwalls for the review

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

PR Comment: https://git.openjdk.org/jdk/pull/28794#issuecomment-3662832242

Reply via email to