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

Serguei Spitsyn sspitsyn at openjdk.java.net
Tue Jan 26 10:05:44 UTC 2021


On Mon, 25 Jan 2021 21:34:54 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Lin Zang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix coding style issue
>
> Copyrights need updating.

Minor suggestion for `src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JMap.java`:
+                        } else if (keyValue[0].equals("gz")) {
+                            if (keyValue.length == 1) {
+                                System.err.println("Argument is expected for "gz"");
+                                System.exit(1);
+                            }
+                            String level = keyValue[1];
+                            if (mode == MODE_HEAP_GRAPH_GXL) {
+                                System.err.println(""gz" option is not compatible with heap dump in GXL format");
+                                System.exit(1);
+                            }
+                            . . .
The check of MODE_HEAP_GRAPH_GXL is better to move above the check ` if (keyValue.length == 1)`.

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

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


More information about the serviceability-dev mailing list