RFR: 8252842: Extend jmap to support parallel heap dump

Lin Zang lzang at openjdk.java.net
Wed Jan 27 13:14:40 UTC 2021


On Wed, 27 Jan 2021 12:49:29 GMT, Lin Zang <lzang at openjdk.org> wrote:

> 8252842: Extend jmap to support parallel heap dump

src/jdk.jcmd/share/classes/sun/tools/jmap/JMap.java line 263:

> 261:         // See AttachOperation::arg_count_max in attachListener.hpp for argument count limitation.
> 262:         String more_args = compress_level + "," + parallel;
> 263:         // dumpHeap is not the same as jcmd GC.heap_dump

To-discuss: 
Compatibility issue that new version of jmap work on old JDK may wrongly processing the following case:
jmap -dump:file=dump.hprof,gz=1,parallel=2 <pid>
this will cause the gz option not recognized correctly.

Can not simply change arg_count_max to 4, because it could cause JDK hang on waiting for arguments when old jmap is used.

-------------

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


More information about the serviceability-dev mailing list