8251848: JMap.histo() and JMap.dump() should parse sub-arguments similarly
Update JMap histo/dump parsing code Reviewed-by: sspitsyn, phh
This commit is contained in:
parent
8ce2053723
commit
58a3e40a5c
@ -181,7 +181,7 @@ public class JMap {
|
||||
} else if (subopt.startsWith("file=")) {
|
||||
filename = parseFileName(subopt);
|
||||
if (filename == null) {
|
||||
System.err.println("Fail: invalid option or no file name '" + subopt +"'");
|
||||
System.err.println("Fail: invalid option or no file name '" + subopt + "'");
|
||||
usage(1);
|
||||
}
|
||||
} else if (subopt.startsWith("parallel=")) {
|
||||
@ -218,6 +218,10 @@ public class JMap {
|
||||
liveopt = "-live";
|
||||
} else if (subopt.startsWith("file=")) {
|
||||
filename = parseFileName(subopt);
|
||||
if (filename == null) {
|
||||
System.err.println("Fail: invalid option or no file name '" + subopt + "'");
|
||||
usage(1);
|
||||
}
|
||||
} else if (subopt.equals("format=b")) {
|
||||
// ignore format (not needed at this time)
|
||||
} else {
|
||||
@ -231,6 +235,8 @@ public class JMap {
|
||||
usage(1);
|
||||
}
|
||||
|
||||
System.out.flush();
|
||||
|
||||
// dumpHeap is not the same as jcmd GC.heap_dump
|
||||
executeCommandForPid(pid, "dumpheap", filename, liveopt);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user