On java 8 giving JVM a command line options
-XX:+PrintGCDateStamps and -XX:+PrintGCDetailsresults in the JVM printing exactly on line per each GC operation, like this:
2018-03-21T01:35:39.624-0700: [GC (Allocation Failure) [PSYoungGen: 328192K->23443K(382464K)] 328192K->23459K(1256448K), 0.0268406 secs] [Times: user=0.04 sys=0.01, real=0.03 secs]
or
2018-03-21T01:35:58.404-0700: [Full GC (Metadata GC Threshold) [PSYoungGen: 1952K->0K(348672K)] [ParOldGen: 457235K->256822K(873984K)] 459187K->256822K(1222656K), [Metaspace: 122374K->122350K(1163264K)], 0.9086909 secs] [Times: user=3.25 sys=0.01, real=0.91 secs]
How can I make Java 9 do something similar? One row per GC operation and preferably listing both elapsed time and the amount of memory free after the operation.
The closest I've been able to get is to enable GC logging at level 'info', like this: -Xlog:gc=info.
However, it still prints half a dozen rows for every round of GC.