RFR: 8257234 : Add gz option to SA jmap to write a gzipped heap dump [v15]

Chris Plummer cjplummer at openjdk.java.net
Sat Feb 6 04:45:45 UTC 2021


On Fri, 5 Feb 2021 15:36:00 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> 8257234 : Add gz option to SA jmap to write a gzipped heap dump
>
> Lin Zang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   refine help message and also refactor the logic in CommandProcessor

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java line 131:

> 129:         System.out.println("        dump options:");
> 130:         System.out.println("          --dumpfile <name> The name of the dump file.");
> 131:         System.out.println("          --gz <1-9>        The compression level for gzipped dump file.");

This is a little awkward, and will get worse if later you add an option to dump in GXL format (format=x). Maybe for `--dumpfile` and `--gz` just add a comment "Only valid with --binaryheap".

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java line 1807:

> 1805:                         }
> 1806:                         filename = "heap.bin.gz";
> 1807:                     }

I don't think this section works properly if there is just one argument, and it is the filename, not gz=. Also, there appears to be no test case to catch this bug.

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

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


More information about the hotspot-runtime-dev mailing list