The VM.native_memory diagnostic command seems somewhat picky with the
input. It takes seven options where one is a scale (KB, MB or GB) and
the other six are mutually exclusive actions.
That "jcmd VM.native_memory baseline=true scale=KB" works is expected
and that "jcmd VM.native_memory baseline=true detail=true scale=KB"
gives the error message "At most one of the following option can be
specified: summary, detail, baseline, summary.diff, detail.diff,
shutdown" is also expected.
The problem is that "jcmd VM.native_memory baseline=true detail=false
scale=KB" does raise the same error message. My intuitive thought was that setting a
boolean option to false or omitting would behave in the same way. That does not seem to be true.
Could the six action types be reworked in some way? I would like to see something along the lines of
action : [optional] The different actions to be performed for the command.
summary : request runtime to report current memory summary, which includes total reserved and committed memory, along with memory usage summary by each subsytem. (default)
detail : request runtime to report memory allocation >= 1K by each callsite.
baseline : request runtime to baseline current memory usage, so it can be compared against in later time.
summary.diff : request runtime to report memory summary comparison against previous baseline.
detail.diff : request runtime to report memory detail comparison against previous baseline, which shows the memory allocation activities at different callsites.
shutdown : request runtime to shutdown itself and free the memory used by runtime.
scale : [optional] Memory usage in which scale, KB, MB or GB (STRING, KB)
From a Java Mission Control (JMC) user perspective it would be a real improvement to choose an action from a list instead of checking and unchecking various boolean values for the different arguments.
input. It takes seven options where one is a scale (KB, MB or GB) and
the other six are mutually exclusive actions.
That "jcmd VM.native_memory baseline=true scale=KB" works is expected
and that "jcmd VM.native_memory baseline=true detail=true scale=KB"
gives the error message "At most one of the following option can be
specified: summary, detail, baseline, summary.diff, detail.diff,
shutdown" is also expected.
The problem is that "jcmd VM.native_memory baseline=true detail=false
scale=KB" does raise the same error message. My intuitive thought was that setting a
boolean option to false or omitting would behave in the same way. That does not seem to be true.
Could the six action types be reworked in some way? I would like to see something along the lines of
action : [optional] The different actions to be performed for the command.
summary : request runtime to report current memory summary, which includes total reserved and committed memory, along with memory usage summary by each subsytem. (default)
detail : request runtime to report memory allocation >= 1K by each callsite.
baseline : request runtime to baseline current memory usage, so it can be compared against in later time.
summary.diff : request runtime to report memory summary comparison against previous baseline.
detail.diff : request runtime to report memory detail comparison against previous baseline, which shows the memory allocation activities at different callsites.
shutdown : request runtime to shutdown itself and free the memory used by runtime.
scale : [optional] Memory usage in which scale, KB, MB or GB (STRING, KB)
From a Java Mission Control (JMC) user perspective it would be a real improvement to choose an action from a list instead of checking and unchecking various boolean values for the different arguments.