RFR: 8273929: Remove GzipRandomAccess in heap dump test

Chris Plummer cjplummer at openjdk.java.net
Tue Oct 5 05:37:07 UTC 2021


On Sun, 26 Sep 2021 08:07:46 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> test/lib/jdk/test/lib/hprof/parser/Reader.java line 99:
>> 
>>> 97:                 // Possible gziped file, try decompress it and get the stack trace.
>>> 98:                 in.close();
>>> 99:                 String deCompressedFile = "heapdump" + System.currentTimeMillis() + ".hprof";
>> 
>> Is it necessary to create a file with the decompressed output rather than just stream the decompressed output to a FileInputStream?
>
> Hi @plummercj, 
> Sorry for late response, I tried to avoid using the decompressed file, but it seems not simple as I expected. 
> The reason is that at line 121, the HprofReader require the filename and it use this file to create a ReadBuffer internally, and a RandomAccessFile will be created using the filename. 
> So I think may be it is not easy to make the change here, and maybe we could track it using a new bug if necessary, which may change the HprofReader implementation.
> What do you think?

Yes, it's fine then the way it currently is implemented. Thanks.

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

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


More information about the serviceability-dev mailing list