Is there a replacement for the garbage collection JVM args in Java 11?

柔情痞子 提交于 2019-11-29 03:46:59

List of your <arguments, current mapping, reasons> is as follows:

-XX:+PrintGCTimeStamps    
-XX:+PrintGCDateStamps    ==>  Not applicable now. 

Reason: Time/date stamps are logged by the framework.


-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     ==>  Not Applicable

Note: Same as what was logged for PrintTenuringDistribution.


-XX:NumberOfGCLogFiles    
-XX:GCLogFileSize          ==>  Not Applicable

Reason: Log rotation is handled by the framework.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!