Details
Description
Summary
Add an option to write a gzip compressed heap dump via the jmap -dump command
Problem
There has been gz option for jcmd GC.heap_dump diagnostic command (JDK-8237354), adding the same option to jmap -dump command could help user get compressed heap dump file with jmap.
Solution
Add an "gz=" option to support write compressed heap dump file via jmap -dump command.
An example would be:
jmap -dump:gz=4,file=heapdump.gz [pid]
This would trigger a gzip compressed heap dump of the specified VM, using a compression level of 4.
Specification
Add an integer option called gz to the jmap -dump command. If it is specified, it will enable the gzip compression of the written heap dump. The supplied value is the compression level. The value can range from 1 (fastest) to 9 (slowest, but best compression). The recommended level is 1.
Diff of Specificaion
dump-options:
live dump only live objects (takes precedence if both "live" and "all" are specified)
all dump all objects in the heap (default if one of "live" or "all" is not specified)
format=b binary format
file=<file> dump heap to <file>
+ gz=<number> If specified, the heap dump is written in gzipped format using the given compression level.
+ 1 (recommended) is the fastest, 9 the strongest compression.
Attachments
Issue Links
- csr of
-
JDK-8256450 Add gz option to jmap to write a gzipped heap dump
- Resolved