RFR: 8267666: Add option to jcmd GC.heap_dump to use existing file

Anton Kozlov akozlov at openjdk.java.net
Wed May 26 09:37:13 UTC 2021


On Tue, 25 May 2021 11:23:33 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

> Please review a small change that adds an option to GC.heap_dump to use an existing file. 
> 
> The option is necessary if the target file is a predefined file-like object, like a named pipe. This opens up a lot of possibilities to process a heap dump without storing it to the file system first.
> 
> Reviews of the CSR linked to the bug would be appreciated as well.

AFAIK such enhancement was not discussed before. Please consider this review request also as a start of a discussion. The implementation is rather small, so I thought it was not worth a separate CFD in advance.

I added few details to the bug. The change does not depend on a particular operating system, but on Linux, for example, the new option allows sending the dump to the external LZ4 process. It provides a compressed dump of the heap 2x faster than it is possible now, at the speed comparable to writing uncompressed dump.

Thanks!

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

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


More information about the hotspot-runtime-dev mailing list