8265612: revise the help info for jmap histo command

Reviewed-by: cjplummer, sspitsyn
This commit is contained in:
Lin Zang 2021-05-07 04:40:49 +00:00 committed by Serguei Spitsyn
parent c97f56cdaf
commit 3a474d953a

View File

@ -226,11 +226,11 @@ public class JMap {
} else if (subopt.equals("format=b")) {
// ignore format (not needed at this time)
} else if (subopt.startsWith("gz=")) {
compress_level = subopt.substring("gz=".length());
if (compress_level.length() == 0) {
compress_level = subopt.substring("gz=".length());
if (compress_level.length() == 0) {
System.err.println("Fail: no number provided in option: '" + subopt + "'");
usage(1);
}
}
} else {
System.err.println("Fail: invalid option: '" + subopt + "'");
usage(1);
@ -316,13 +316,13 @@ public class JMap {
System.err.println(" Example: jmap -dump:live,format=b,file=heap.bin <pid>");
System.err.println("");
System.err.println(" histo-options:");
System.err.println(" live count only live objects (takes precedence if both \"live\" and \"all\" are specified)");
System.err.println(" all count all objects in the heap (default if one of \"live\" or \"all\" is not specified)");
System.err.println(" file=<file> dump data to <file>");
System.err.println(" parallel=<number> parallel threads number for heap iteration:");
System.err.println(" parallel=0 default behavior, use predefined number of threads");
System.err.println(" parallel=1 disable parallel heap iteration");
System.err.println(" parallel=<N> use N threads for parallel heap iteration");
System.err.println(" live count only live objects (takes precedence if both \"live\" and \"all\" are specified)");
System.err.println(" all count all objects in the heap (default if one of \"live\" or \"all\" is not specified)");
System.err.println(" file=<file> dump data to <file>");
System.err.println(" parallel=<number> Number of parallel threads to use for heap inspection:");
System.err.println(" 0 (the default) means let the VM determine the number of threads to use");
System.err.println(" 1 means use one thread (disable parallelism).");
System.err.println(" For any other value the VM will try to use the specified number of threads, but might use fewer.");
System.err.println("");
System.err.println(" Example: jmap -histo:live,file=/tmp/histo.data <pid>");
System.exit(exit);