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

Lin Zang lzang at openjdk.java.net
Wed Feb 10 02:31:43 UTC 2021


On Wed, 10 Feb 2021 01:53:38 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> 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.

Nice Catch! I will make the change, Thanks @YaSuenag !

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

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


More information about the hotspot-runtime-dev mailing list