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

Yasumasa Suenaga ysuenaga at openjdk.java.net
Wed Feb 10 01:56:43 UTC 2021


On Tue, 9 Feb 2021 10:04:55 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 code in test.

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java line 1504:

> 1502:             segmentBuffer[segmentWritten++] = (byte)(v >>>  8);
> 1503:             segmentBuffer[segmentWritten++] = (byte)(v >>>  0);
> 1504:         }

I'm not familiar to hprof format, but I guess we need to write them with big endian.
Can we use `ByteBuffer::putInt` and `ByteBuffer::order` at here? I guess it makes ease to maintenance.

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

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


More information about the serviceability-dev mailing list