Is there a replacement for the garbage collection JVM args in Java 11?
List of your <arguments, current mapping, reasons>
is as follows:
-XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps ==> decoration options -Xlog:::time,level,tags
-XX:+PrintGCDetails ==> -Xlog:gc*
-XX:+PrintGCApplicationStoppedTime ==> -Xlog:safepoint
Note: PrintGCApplicationConcurrentTime
and PrintGCApplicationStoppedTime
are logged on the same tag and not separated in the new logging.
-XX:+UseGCLogFileRotation-XX:NumberOfGCLogFiles -XX:GCLogFileSize ==> output options -Xlog::::filecount=5,filesize=1024
The bits that are handled by the framework do require tweaking
Reference: The documentation I've referred to and request you to follow for such migration details.
BTW, although the NumberOfGCLogFiles
and GCLogFileSize
options are gone in Java 11, it is still possible to set rolling file size and count. For example:
java -Xlog:gc*,safepoint:gc.log:time,uptime:filecount=100,filesize=128K ...
It does print date with time
-Xlog:gc*:verbose_gc.log:time[2019-05-13T14:01:03.356+0530] Heap region size: 1M[2019-05-13T14:01:03.357+0530] Using G1
NOTE :- JDK 11 been used