JDK-8260282 : Add option to compress heap dumps created by -XX:+HeapDumpOnOutOfMemoryError
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-01-22
  • Updated: 2025-05-12
  • Resolved: 2021-01-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b08Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8237354 added the option to the GC.HeapDump jcmd, to create gzipped heap dumps. JDK-8256450 added the feature to heap dumps via jmap. But the heap dumps created via -XX:+HeapDumpOnOutOfMemoryError are currently always uncompressed.

This should be changed by adding a command line flag which lets the user specify the compression level of the created heap dump. The default would be to not compress the dump (as it is today).

Comments
[~rschmelter] According to https://wiki.openjdk.java.net/display/HotSpot/Hotspot+Command-line+Flags%3A+Kinds%2C+Lifecycle+and+the+CSR+Process The new "manageable" option "HeapDumpGzipLevel" would have required a CSR. I don't see it. Has it been done, but not linked?
25-11-2021

Fix Request With JDK-8273668 the feature to write a compressed heap dump via jcmd was backported to 11. This enables the compression for a heap dump with --XX:+HeapDumpOnOutOfMemoryError too. It is a small change without much potential for problems.
19-11-2021

Changeset: d2b0ea1d Author: Ralf Schmelter <rschmelter@openjdk.org> Date: 2021-01-29 13:53:40 +0000 URL: https://git.openjdk.java.net/jdk/commit/d2b0ea1d
29-01-2021