JDK-8237354 : Add option to jcmd to write a gzipped heap dump
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-01-16
  • Updated: 2022-05-25
  • Resolved: 2020-06-10
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 11 JDK 15 JDK 16
11.0.14Fixed 15 b27Fixed 16Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8250554 :  
Description
An option should be added to the GC.dump_heap command, to write the hprof file in gzipped format.

This usually saves a lot of space (about factor 3 in our tests).

Heap hero already let's you upload gzipped hprof files. And the Eclipse Memory Analyzer (MAT) has recently got this feature (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=438844), which should be in the next official release.

Since the deflate algorithm used in the gzip format is not very fast, the compression should be done in parallel as far as possible.


Comments
Hi Goetz, Thanks a lot for point it out! So sorry about my wrong behavior, will never do that again. Thanks! BRs, Lin
13-09-2021

Hi Lin, You removed the jdk11u-fix-request tag and added jdk11u-fix-yes. You can not do that. Setting jdk11u-fix-yes is reserved for official jdk11u maintainers, which are Andrew Haley, Christoph Langer, Severin Gehwolf and me. You find the list on the jdk11u project page: https://wiki.openjdk.java.net/display/JDKUpdates/JDK11u I have been waiting with setting the tag until the change is reviewed. I had asked my colleague Ralf to help with this, as he obviously knows the change. Please respect the rules and be patient until others have done their parts. If you add jdk11u-fix-request again, I will approve the change, and you can push. Best regards, Goetz.
13-09-2021

Hi Goetz, Thanks a lot for reviewing and comments. I have added some information. would you like to help review again? Thanks! Lin
07-09-2021

Fix Request (11u) Please approve backporting this to OpenJDK 11u. The backport is https://github.com/openjdk/jdk11u-dev/pull/209 and it does not apply cleanly, we have adjusted some codes to fix it. The reason for downporting is that the gziped file format is good at saving disk storage and transportation bandwidth, which we believe is an important feature for cloud computing and other scenario. We believe the risk of downport is low since most of the codes are same as the original one in jdk-master. And our adjustment only targets at the problems introduced by backporting sequences -- that is, some patches are pushed later than this one at master get backported earlier in jdk11u, so some code change needed to make it work as expected. More information could be found at the description of PR on github(https://github.com/openjdk/jdk11u-dev/pull/209) Thanks! Lin
07-09-2021

Hi Lin Zang, I would like to approve this change, but please first add to your backport request why you want to downport this and how you rate the risk of downporting it. And usually we mark the downport request comment with "Fix request (11u)" Best regards, Goetz.
07-09-2021

The backport PR for jdk11u is https://github.com/openjdk/jdk11u-dev/pull/209
20-08-2021

Changeset: 19be4971 Author: Ralf Schmelter <rschmelter@openjdk.org> Date: 2020-06-10 12:29:01 +0000 URL: https://git.openjdk.java.net/lanai/commit/19be4971
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/649ca60ef516 User: rschmelter Date: 2020-06-10 10:31:16 +0000
10-06-2020

The reviews are a bit spread over time, so I assembled them here: http://mail.openjdk.java.net/pipermail/serviceability-dev/2020-February/030369.html http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-March/038632.html http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-April/039004.html http://mail.openjdk.java.net/pipermail/serviceability-dev/2020-May/031363.html http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-June/039897.html
03-06-2020