RFR(L) 8237354: Add option to jcmd to write a gzipped heap dump

Yasumasa Suenaga suenaga at oss.nttdata.com
Sat Feb 8 13:45:37 UTC 2020


Hi Ralf,


- diagnosticCommand.cpp
  You can use `DCmdArgument<jlong>` for -gz option.
  If you want to use lesser type (e.g. int, unsigned char), I guess you need to modify GenDCmdArgument class.

- heapDumper.cpp
  _nr_of_threads, _id_to_write, _current in CompressionBackend should be added `volatile` at least.
  (Other values need to be checked)


BTW how much processing time is different between single threaded and multi threaded?
Also I want to know what number is set to ParallelGCThreads.
ParallelGCThreads seems to affect to thread num for GZip compression.


Thanks,

Yasumasa


On 2020/02/07 21:14, Schmelter, Ralf wrote:
> Hi everyone,
> 
> this change adds the option to write a hprof heap dump directly gzipped. Currently this is supported for the GC.heap_dump diagnostic command via the “-gz” flag.
> 
> Since gzip is not particular fast when compressing the data, the actual compression will be done parallel in a bunch of background threads.
> 
> The created file itself is not a single gzip stream, but a concatenation of streams of about 1 MB gzippped data. This makes it easier to parallelize the compression and it allows for an at least semi-efficient random access to the created file. I’ve adjusted the jhat library to be able to directly parse a such a gzipped hrpof  file, without the need of prior decompression.
> 
> bugreport: https://bugs.openjdk.java.net/browse/JDK-8237354
> 
> webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8237354/webrev.0/
> 
> If this get reviewed, a CSR is still needed for the change to the GC.heap_dump command.
> 
> Best regards,
> 
> Ralf
> 


More information about the serviceability-dev mailing list