Same with -XX:+HeapDumpBeforeFullGC
java -Xlog:gc*,gc+heap=trace -XX:+HeapDumpAfterFullGC ...
[0,170s][info ][gc,start] GC(0) Pause Full (System.gc()) (0,170s)
[0,170s][info ][gc,start] GC(1) Heap Dump (before full gc) (0,170s)
Dumping heap to java_pid20263.hprof ...
Heap dump file created [5280418 bytes in 0,047 secs]
[0,217s][info ][gc ] GC(1) Heap Dump (before full gc) (0,170s, 0,217s) 47,458ms
[0,229s][info ][gc ] GC(0) Pause Full (System.gc()) 3M->0M(1030M) (0,170s, 0,229s) 59,449ms
[0,229s][info ][gc,heap ] GC(0) Eden: 4096K->0K(1048576K)
[0,229s][info ][gc,heap ] GC(0) Survivor: 0K->0K(0K)
[0,229s][info ][gc,heap ] GC(0) Old: 0K->1024K
[0,229s][info ][gc,heap ] GC(0) Humongous: 0K->0K
[0,229s][info ][gc,metaspace] GC(0) Metaspace: 3367K->3367K(1056768K)
[0,229s][trace ][gc,heap ] GC(0) Heap after GC invocations=1 (full 1):
[0,229s][trace ][gc,heap ] GC(0) garbage-first heap total 1054720K, used 1017K [0x0000000080000000, 0x0000000080102030, 0x0000000100000000)
[0,229s][trace ][gc,heap ] GC(0) region size 1024K, 0 young (0K), 0 survivors (0K)
[0,229s][trace ][gc,heap ] GC(0) Metaspace used 3367K, capacity 4486K, committed 4864K, reserved 1056768K
[0,229s][trace ][gc,heap ] GC(0) class space used 336K, capacity 386K, committed 512K, reserved 1048576K
[0,229s][info ][gc,start ] GC(2) Heap Dump (after full gc) (0,229s)
Dumping heap to java_pid20263.hprof.1 ...
Heap dump file created [2393171 bytes in 0,018 secs]
[0,247s][info ][gc ] GC(2) Heap Dump (after full gc) (0,229s, 0,247s) 17,943ms
java -Xlog:gc*,gc+heap=trace -XX:+HeapDumpAfterFullGC ...
[0,170s][info ][gc,start] GC(0) Pause Full (System.gc()) (0,170s)
[0,170s][info ][gc,start] GC(1) Heap Dump (before full gc) (0,170s)
Dumping heap to java_pid20263.hprof ...
Heap dump file created [5280418 bytes in 0,047 secs]
[0,217s][info ][gc ] GC(1) Heap Dump (before full gc) (0,170s, 0,217s) 47,458ms
[0,229s][info ][gc ] GC(0) Pause Full (System.gc()) 3M->0M(1030M) (0,170s, 0,229s) 59,449ms
[0,229s][info ][gc,heap ] GC(0) Eden: 4096K->0K(1048576K)
[0,229s][info ][gc,heap ] GC(0) Survivor: 0K->0K(0K)
[0,229s][info ][gc,heap ] GC(0) Old: 0K->1024K
[0,229s][info ][gc,heap ] GC(0) Humongous: 0K->0K
[0,229s][info ][gc,metaspace] GC(0) Metaspace: 3367K->3367K(1056768K)
[0,229s][trace ][gc,heap ] GC(0) Heap after GC invocations=1 (full 1):
[0,229s][trace ][gc,heap ] GC(0) garbage-first heap total 1054720K, used 1017K [0x0000000080000000, 0x0000000080102030, 0x0000000100000000)
[0,229s][trace ][gc,heap ] GC(0) region size 1024K, 0 young (0K), 0 survivors (0K)
[0,229s][trace ][gc,heap ] GC(0) Metaspace used 3367K, capacity 4486K, committed 4864K, reserved 1056768K
[0,229s][trace ][gc,heap ] GC(0) class space used 336K, capacity 386K, committed 512K, reserved 1048576K
[0,229s][info ][gc,start ] GC(2) Heap Dump (after full gc) (0,229s)
Dumping heap to java_pid20263.hprof.1 ...
Heap dump file created [2393171 bytes in 0,018 secs]
[0,247s][info ][gc ] GC(2) Heap Dump (after full gc) (0,229s, 0,247s) 17,943ms