[Q&A] -XX:+PrintCommandLineFlags 作用
-XX:+PrintCommandLineFlags
把传递给虚拟机的参数输出(隐式传递+显式传递)
样例1:
控制台打印信息
-XX:ConcGCThreads=3 -XX:G1ConcRefinementThreads=13 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=254884992 -XX:MarkStackSize=4194304 -XX:MaxHeapSize=4078159872 -XX:MinHeapSize=6815736 -XX:+PrintCommandLineFlags -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC -XX:-UseLargePagesIndividualAllocation
样例2:
控制台打印信息
-XX:ConcGCThreads=3 -XX:G1ConcRefinementThreads=13 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=67108864
-XX:MarkStackSize=4194304 -XX:MaxHeapSize=134217728
-XX:MinHeapSize=67108864
-XX:+PrintCommandLineFlags -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC -XX:-UseLargePagesIndividualAllocation
参考
Further Reading : JVM常用参数