Summary
Add a clear description of the expected behavior of using options "live" and "all" together for jmap.
Problem
jmap -histo and jmap -dump can accept "live" and "all" options together. The specification should describe clearly what is the expected behavior of using them together.
Solution
Add the description "live dump only live objects (takes precedence if both \"live\" and \"all\" are specified)" to help info of jmap -dump command.
and add "live count only live objects (takes precedence if both \"live\" and \"all\" are specified)" to help info of jmap -histo.
Specification
Updated specification:
Usage:
jmap -clstats <pid>
to connect to running process and print class loader statistics
jmap -finalizerinfo <pid>
to connect to running process and print information on objects awaiting finalization
jmap -histo[:[<histo-options>]] <pid>
to connect to running process and print histogram of java object heap
jmap -dump:<dump-options> <pid>
to connect to running process and dump java heap
jmap -? -h --help
to print this help message
dump-options:
live dump only live objects (takes precedence if both "live" and "all" are specified)
all dump all objects in the heap (default if one of "live" or "all" is not specified)
format=b binary format
file=<file> dump heap to <file>
Example: jmap -dump:live,format=b,file=heap.bin <pid>
histo-options:
live count only live objects (takes precedence if both "live" and "all" are specified)
all count all objects in the heap (default if one of "live" or "all" is not specified)
file=<file> dump data to <file>
parallel=<number> parallel threads number for heap iteration:
parallel=0 default behavior, use predefined number of threads
parallel=1 disable parallel heap iteration
parallel=<N> use N threads for parallel heap iteration
Example: jmap -histo:live,file=/tmp/histo.data <pid>
- csr of
-
JDK-8252101 Add description of expected behavior of using "live" and "all" options together for jmap
- Resolved