On Fri, 12 Feb 2021 00:56:47 GMT, Lin Zang <lz...@openjdk.org> wrote:
>>> BTW, one thing to keep in mind that whatever we do with `dumpheap`, the >>> jcmd version will support fine control over parallelism. So for that reason >>> it wouldn't be so bad to just have `dumpheap` and `inspectheap` always use >>> some default parallelism, and allow tuning it with the jcmd versions. But >>> since the `inspectheap` parallel support already went into 16, that might >>> be hard to undo. >> >> Hi Chris, Lin, >> IMHO, 16 is not an LTS, maybe it's better for us to adjust the behavior of >> jmap -histo in 17 which is LTS? I just filed >> https://bugs.openjdk.java.net/browse/JDK-8261482 to address the issue if you >> both think it's OK to undo it. >> Thanks. > > Hi Chris, > I have update the PR to add a new dumpheapext command that could handle more > arguments passed from JMap.java. > And I have tested with "jmap -dump:file=dump.bin,noparallel [pid]", with this > change, new jmap targeting on old hotspot would print: > > Exception in thread "main" > com.sun.tools.attach.AttachOperationFailedException: Operation dumpheapext > not recognized! > at > jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:227) > at > jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:309) > at jdk.jcmd/sun.tools.jmap.JMap.executeCommandForPid(JMap.java:133) > at jdk.jcmd/sun.tools.jmap.JMap.dump(JMap.java:262) > at jdk.jcmd/sun.tools.jmap.JMap.main(JMap.java:114) > > IMH, one problem is that it doesn't give out the reason clearly that > "dumpheapext" is actually caused by new option "noparallel". But I think > having this kind of error message is acceptable. Otherwise it seems the > choice we left is remove the "parallel/noparallel" for Jmap. What do you > think? Dear All, I am going to create a CSR for the new internal command "dumpheapext", one problem is that seem if a new CSR is created, this PR will depends on 2 CSRs, I am not sure is this reasonable? Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/2261