On Thu, 18 Feb 2021 08:58:25 GMT, Lin Zang <lz...@openjdk.org> wrote:
>> 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! I was thought the plan was for new the `jmap` to detect the error, eat the exception, and retry with the `dumpheap` command (without any `parallel` related option). Or the other option would be to eat the exception and produce an error message saying that the `parallel` option is not supported by the target VM. I don't think the user should be exposed to the "Operation dumpheapext not recognized" message. > 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! I have no idea if you can add two CSRs to a PR and a CR. If you can, then I see no issue with doing that. If not, we might need to talk to the CSR committee to see how best to handle it. ------------- PR: https://git.openjdk.java.net/jdk/pull/2261