-
Enhancement
-
Resolution: Fixed
-
P5
-
14
-
b23
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8272989 | 11.0.13 | Christoph Langer | P5 | Resolved | Fixed | b05 |
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]
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]
- backported by
-
JDK-8272989 Forward output from heap dumper to jcmd/jmap
-
- Resolved
-