Skip to content
Permalink
Browse files
8265612: revise the help info for jmap histo command
Reviewed-by: cjplummer, sspitsyn
  • Loading branch information
Lin Zang authored and Serguei Spitsyn committed May 7, 2021
1 parent c97f56c commit 3a474d953a608a0e4b40a4d0b53ec3e98d73f406
Showing with 10 additions and 10 deletions.
  1. +10 −10 src/jdk.jcmd/share/classes/sun/tools/jmap/JMap.java
@@ -226,11 +226,11 @@ private static void dump(String pid, String options)
} 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 @@ private static void usage(int exit) {
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);

0 comments on commit 3a474d9

Please sign in to comment.