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

Forward output from heap dumper to jcmd/jmap

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b23

      Backports

        Description

        When writing a heap dump on OOM, the heap dumper prints the name of the heap dump file, the duration it took and the size of the generated file to tty. In case of an error, an error message is written instead.

        The "GC.heap_dump" diagnostic command and the "dumpheap" command of the attach listener call the heap dumper and then write part of the information in the result stream. They miss the filename used, the duration it took and the size of the created file.

        Returning the output of the HeapDumper.dump() method instead would remove the code duplication and lead to better output in the jcmd/jmap tools.

        Example:

        old output:
        Heap dump file created

        new output:
        Dumping heap to test.hprof ...
        Heap dump file created [9719330384 bytes in 27,759 secs]

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rschmelter Ralf Schmelter
                Reporter:
                rschmelter Ralf Schmelter
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: