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

Anton Kozlov akozlov at openjdk.java.net
Wed Jun 2 20:51:46 UTC 2021


On Wed, 2 Jun 2021 20:05:56 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.
>
> Anton Kozlov has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Fix create_binary_file
>  - Rename option to -overwrite

I have renamed the option to `-overwrite`. Nice catch about missing O_TRUNC, thanks! A case for the missing O_NOCTTY looks rather special, wouldn't it be a configuration issue?..

SInce JDK-8263066 suggests more enhancements, it may be worth keeping it to track the remaining ones.

@AlanBateman The patch does not do anything special to the named pipe use-case, although makes it possible. Do you suggest removing mentions of the use-case from the CSR? Otherwise, what concerns could I address? 

Thanks!

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

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


More information about the serviceability-dev mailing list