遇到这个,奇怪的是,我找不到任何关于它的页面。在谷歌上搜索"PrintHeapAtGC无法识别"没有任何帮助。事实上,它导致线程讨论人们如何在 JVM 11 中毫无问题地使用它。
我已经打印了每行一个使用的标志,也许是因为我不知道甚至是组合的某种组合?
我什至如何检查?
有人可以看看这个并告诉我出了什么问题吗?
-XX:+ExitOnOutOfMemoryError
-XX:NewRatio=3
-XX:SurvivorRatio=4
-XX:TargetSurvivorRatio=90
-XX:MaxTenuringThreshold=8
-XX:+UseParallelGC
-XX:ParallelGCThreads=4
-XX:+CMSScavengeBeforeRemark
-XX:PretenureSizeThreshold=64m
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=50
-XX:CMSMaxAbortablePrecleanTime=6000
-XX:+CMSParallelRemarkEnabled
-XX:+ParallelRefProcEnabled
-XX:-OmitStackTraceInFastThrow -verbose:gc
-XX:+PrintHeapAtGC
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime -Xloggc:/tmp/gc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=9
-XX:GCLogFileSize=20M
-XX:+PrintFlagsFinal
-XX:+PrintFlagsWithComments -version
自 JDK 9 以来,没有更多的-XX:+PrintHeapAtGC
和其他一些打印选项。-XX
日志记录标志已替换为统一 JVM 日志记录机制。
PrintHeapAtGC 的新等效项是-Xlog:gc+heap=debug