RFR: 8252842: Extend jmap to support parallel heap dump

David Holmes david.holmes at oracle.com
Fri Feb 19 03:58:40 UTC 2021


On 19/02/2021 2:42 am, Chris Plummer wrote:
> On Thu, 18 Feb 2021 08:58:25 GMT, Lin Zang <lzang at 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.

CSR requests are associated with a JBS issue not a PR. If there exists a 
CSR request for this JBS issue and you are making further changes then 
move the CSR back to draft and update it and re-submit it.

Thanks,
David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/2261
> 


More information about the serviceability-dev mailing list