Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263066

Add option to jcmd to overwrite a heap dump or stream to special files

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 11, 16, 17
    • core-svc

      Currently you cannot overwrite an already existing heap dump with jcmd GC.heap_dump, neither can you write to named pipes (Windows) or domain sockets or similar devices (Unix).

      The enhancement proposes to add two additional switches to the GC.heap_dump diagnostic command which would enable both use cases:
      - an '-overwrite' flag would allow the user to overwrite (using truncation) an already existing heap dump; if the specified file is not already present, it would be created as without the flag.
      - a '-stream' flag would allow to write to special files like pipes, domain sockets or ttys; the file will not be truncated and if it is not already present, an error will be reported instead of creating it.

      Note that we would not check if the file argument to '-stream' is really a special file or that the argument to '-overwrite' isn't a special file.

            rschmelter Ralf Schmelter
            rschmelter Ralf Schmelter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: