RFR: 8273929: Remove GzipRandomAccess in heap dump test
Chris Plummer
cjplummer at openjdk.java.net
Wed Sep 22 20:26:58 UTC 2021
On Fri, 17 Sep 2021 08:24:54 GMT, Lin Zang <lzang at openjdk.org> wrote:
> The class `GzipRandomAccess` is used to parse heap dump file generated from `jcmd`/`jmap` tools when testing.
> It has the limitation that only gzip file which has "blocksize" header field could be sucessfully parsed.
> We think this class can be removed for 2 reasons:
> 1. The gzip heap dump file generated by `jhsdb` command does not contain the "blocksize" header field, so the GzipRandomAccess can not parse the generated file successfully.
> 2. The `GzipInputStream` could be used instead and then gziped heap dump file generated from both `jcmd`/`jmap` and `jhsdb jmap` could be parsed using same logic.
> Options
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?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5556
More information about the serviceability-dev
mailing list