JVM标准参数

命令行输入如下命令:

  1. java

输出:

  1. 用法: java [-options] class [args...]
  2. (执行类)
  3. java [-options] -jar jarfile [args...]
  4. (执行 jar 文件)
  5. 其中选项包括:
  6. -d32 使用 32 位数据模型 (如果可用)
  7. -d64 使用 64 位数据模型 (如果可用)
  8. -server 选择 "server" VM
  9. 默认 VM server,
  10. 因为您是在服务器类计算机上运行。
  11. -cp <目录和 zip/jar 文件的类搜索路径>
  12. -classpath <目录和 zip/jar 文件的类搜索路径>
  13. : 分隔的目录, JAR 档案
  14. ZIP 档案列表, 用于搜索类文件。
  15. -D<名称>=<值>
  16. 设置系统属性
  17. -verbose:[class|gc|jni]
  18. 启用详细输出
  19. -version 输出产品版本并退出
  20. -version:<值>
  21. 警告: 此功能已过时, 将在
  22. 未来发行版中删除。
  23. 需要指定的版本才能运行
  24. -showversion 输出产品版本并继续
  25. -jre-restrict-search | -no-jre-restrict-search
  26. 警告: 此功能已过时, 将在
  27. 未来发行版中删除。
  28. 在版本搜索中包括/排除用户专用 JRE
  29. -? -help 输出此帮助消息
  30. -X 输出非标准选项的帮助
  31. -ea[:<packagename>...|:<classname>]
  32. -enableassertions[:<packagename>...|:<classname>]
  33. 按指定的粒度启用断言
  34. -da[:<packagename>...|:<classname>]
  35. -disableassertions[:<packagename>...|:<classname>]
  36. 禁用具有指定粒度的断言
  37. -esa | -enablesystemassertions
  38. 启用系统断言
  39. -dsa | -disablesystemassertions
  40. 禁用系统断言
  41. -agentlib:<libname>[=<选项>]
  42. 加载本机代理库 <libname>, 例如 -agentlib:hprof
  43. 另请参阅 -agentlib:jdwp=help -agentlib:hprof=help
  44. -agentpath:<pathname>[=<选项>]
  45. 按完整路径名加载本机代理库
  46. -javaagent:<jarpath>[=<选项>]
  47. 加载 Java 编程语言代理, 请参阅 java.lang.instrument
  48. -splash:<imagepath>
  49. 使用指定的图像显示启动屏幕
  50. 有关详细信息, 请参阅 http://www.oracle.com/technetwork/java/javase/documentation/index.html。

JVM非标准参数

命令行输入如下命令:

  1. java -X

输出:

  1. -Xmixed 混合模式执行 (默认)
  2. -Xint 仅解释模式执行
  3. -Xbootclasspath:<用 : 分隔的目录和 zip/jar 文件>
  4. 设置搜索路径以引导类和资源
  5. -Xbootclasspath/a:<用 : 分隔的目录和 zip/jar 文件>
  6. 附加在引导类路径末尾
  7. -Xbootclasspath/p:<用 : 分隔的目录和 zip/jar 文件>
  8. 置于引导类路径之前
  9. -Xdiag 显示附加诊断消息
  10. -Xnoclassgc 禁用类垃圾收集
  11. -Xincgc 启用增量垃圾收集
  12. -Xloggc:<file> GC 状态记录在文件中 (带时间戳)
  13. -Xbatch 禁用后台编译
  14. -Xms<size> 设置初始 Java 堆大小
  15. -Xmx<size> 设置最大 Java 堆大小
  16. -Xss<size> 设置 Java 线程堆栈大小
  17. -Xprof 输出 cpu 配置文件数据
  18. -Xfuture 启用最严格的检查, 预期将来的默认值
  19. -Xrs 减少 Java/VM 对操作系统信号的使用 (请参阅文档)
  20. -Xcheck:jni JNI 函数执行其他检查
  21. -Xshare:off 不尝试使用共享类数据
  22. -Xshare:auto 在可能的情况下使用共享类数据 (默认)
  23. -Xshare:on 要求使用共享类数据, 否则将失败。
  24. -XshowSettings 显示所有设置并继续
  25. -XshowSettings:all
  26. 显示所有设置并继续
  27. -XshowSettings:vm 显示所有与 vm 相关的设置并继续
  28. -XshowSettings:properties
  29. 显示所有属性设置并继续
  30. -XshowSettings:locale
  31. 显示所有与区域设置相关的设置并继续
  32. -X 选项是非标准选项, 如有更改, 恕不另行通知。
  33. 以下选项为 Mac OS X 特定的选项:
  34. -XstartOnFirstThread
  35. 在第一个 (AppKit) 线程上运行 main() 方法
  36. -Xdock:name=<应用程序名称>"
  37. 覆盖停靠栏中显示的默认应用程序名称
  38. -Xdock:icon=<图标文件的路径>
  39. 覆盖停靠栏中显示的默认图标

JVM不稳定参数

命令行输入如下命令:

  1. java -XX:+PrintFlagsFinal

输出:

  1. [Global flags]
  2. uintx AdaptiveSizeDecrementScaleFactor = 4 {product}
  3. uintx AdaptiveSizeMajorGCDecayTimeScale = 10 {product}
  4. uintx AdaptiveSizePausePolicy = 0 {product}
  5. uintx AdaptiveSizePolicyCollectionCostMargin = 50 {product}
  6. uintx AdaptiveSizePolicyInitializingSteps = 20 {product}
  7. uintx AdaptiveSizePolicyOutputInterval = 0 {product}
  8. uintx AdaptiveSizePolicyWeight = 10 {product}
  9. uintx AdaptiveSizeThroughPutPolicy = 0 {product}
  10. uintx AdaptiveTimeWeight = 25 {product}
  11. bool AdjustConcurrency = false {product}
  12. bool AggressiveOpts = false {product}
  13. intx AliasLevel = 3 {C2 product}
  14. bool AlignVector = false {C2 product}
  15. intx AllocateInstancePrefetchLines = 1 {product}
  16. intx AllocatePrefetchDistance = 192 {product}
  17. intx AllocatePrefetchInstr = 3 {product}
  18. intx AllocatePrefetchLines = 4 {product}
  19. intx AllocatePrefetchStepSize = 64 {product}
  20. intx AllocatePrefetchStyle = 1 {product}
  21. bool AllowJNIEnvProxy = false {product}
  22. bool AllowNonVirtualCalls = false {product}
  23. bool AllowParallelDefineClass = false {product}
  24. bool AllowUserSignalHandlers = false {product}
  25. bool AlwaysActAsServerClassMachine = false {product}
  26. bool AlwaysCompileLoopMethods = false {product}
  27. bool AlwaysLockClassLoader = false {product}
  28. bool AlwaysPreTouch = false {product}
  29. bool AlwaysRestoreFPU = false {product}
  30. bool AlwaysTenure = false {product}
  31. bool AssertOnSuspendWaitFailure = false {product}
  32. bool AssumeMP = false {product}
  33. intx AutoBoxCacheMax = 128 {C2 product}
  34. uintx AutoGCSelectPauseMillis = 5000 {product}
  35. intx BCEATraceLevel = 0 {product}
  36. intx BackEdgeThreshold = 100000 {pd product}
  37. bool BackgroundCompilation = true {pd product}
  38. uintx BaseFootPrintEstimate = 268435456 {product}
  39. intx BiasedLockingBulkRebiasThreshold = 20 {product}
  40. intx BiasedLockingBulkRevokeThreshold = 40 {product}
  41. intx BiasedLockingDecayTime = 25000 {product}
  42. intx BiasedLockingStartupDelay = 4000 {product}
  43. bool BindGCTaskThreadsToCPUs = false {product}
  44. bool BlockLayoutByFrequency = true {C2 product}
  45. intx BlockLayoutMinDiamondPercentage = 20 {C2 product}
  46. bool BlockLayoutRotateLoops = true {C2 product}
  47. bool BranchOnRegister = false {C2 product}
  48. bool BytecodeVerificationLocal = false {product}
  49. bool BytecodeVerificationRemote = true {product}
  50. bool C1OptimizeVirtualCallProfiling = true {C1 product}
  51. bool C1ProfileBranches = true {C1 product}
  52. bool C1ProfileCalls = true {C1 product}
  53. bool C1ProfileCheckcasts = true {C1 product}
  54. bool C1ProfileInlinedCalls = true {C1 product}
  55. bool C1ProfileVirtualCalls = true {C1 product}
  56. bool C1UpdateMethodData = true {C1 product}
  57. intx CICompilerCount := 3 {product}
  58. bool CICompilerCountPerCPU = true {product}
  59. bool CITime = false {product}
  60. bool CMSAbortSemantics = false {product}
  61. uintx CMSAbortablePrecleanMinWorkPerIteration = 100 {product}
  62. intx CMSAbortablePrecleanWaitMillis = 100 {manageable}
  63. uintx CMSBitMapYieldQuantum = 10485760 {product}
  64. uintx CMSBootstrapOccupancy = 50 {product}
  65. bool CMSClassUnloadingEnabled = true {product}
  66. uintx CMSClassUnloadingMaxInterval = 0 {product}
  67. bool CMSCleanOnEnter = true {product}
  68. bool CMSCompactWhenClearAllSoftRefs = true {product}
  69. uintx CMSConcMarkMultiple = 32 {product}
  70. bool CMSConcurrentMTEnabled = true {product}
  71. uintx CMSCoordinatorYieldSleepCount = 10 {product}
  72. bool CMSDumpAtPromotionFailure = false {product}
  73. bool CMSEdenChunksRecordAlways = true {product}
  74. uintx CMSExpAvgFactor = 50 {product}
  75. bool CMSExtrapolateSweep = false {product}
  76. uintx CMSFullGCsBeforeCompaction = 0 {product}
  77. uintx CMSIncrementalDutyCycle = 10 {product}
  78. uintx CMSIncrementalDutyCycleMin = 0 {product}
  79. bool CMSIncrementalMode = false {product}
  80. uintx CMSIncrementalOffset = 0 {product}
  81. bool CMSIncrementalPacing = true {product}
  82. uintx CMSIncrementalSafetyFactor = 10 {product}
  83. uintx CMSIndexedFreeListReplenish = 4 {product}
  84. intx CMSInitiatingOccupancyFraction = -1 {product}
  85. uintx CMSIsTooFullPercentage = 98 {product}
  86. double CMSLargeCoalSurplusPercent = 0.950000 {product}
  87. double CMSLargeSplitSurplusPercent = 1.000000 {product}
  88. bool CMSLoopWarn = false {product}
  89. uintx CMSMaxAbortablePrecleanLoops = 0 {product}
  90. intx CMSMaxAbortablePrecleanTime = 5000 {product}
  91. uintx CMSOldPLABMax = 1024 {product}
  92. uintx CMSOldPLABMin = 16 {product}
  93. uintx CMSOldPLABNumRefills = 4 {product}
  94. uintx CMSOldPLABReactivityFactor = 2 {product}
  95. bool CMSOldPLABResizeQuicker = false {product}
  96. uintx CMSOldPLABToleranceFactor = 4 {product}
  97. bool CMSPLABRecordAlways = true {product}
  98. uintx CMSParPromoteBlocksToClaim = 16 {product}
  99. bool CMSParallelInitialMarkEnabled = true {product}
  100. bool CMSParallelRemarkEnabled = true {product}
  101. bool CMSParallelSurvivorRemarkEnabled = true {product}
  102. uintx CMSPrecleanDenominator = 3 {product}
  103. uintx CMSPrecleanIter = 3 {product}
  104. uintx CMSPrecleanNumerator = 2 {product}
  105. bool CMSPrecleanRefLists1 = true {product}
  106. bool CMSPrecleanRefLists2 = false {product}
  107. bool CMSPrecleanSurvivors1 = false {product}
  108. bool CMSPrecleanSurvivors2 = true {product}
  109. uintx CMSPrecleanThreshold = 1000 {product}
  110. bool CMSPrecleaningEnabled = true {product}
  111. bool CMSPrintChunksInDump = false {product}
  112. bool CMSPrintEdenSurvivorChunks = false {product}
  113. bool CMSPrintObjectsInDump = false {product}
  114. uintx CMSRemarkVerifyVariant = 1 {product}
  115. bool CMSReplenishIntermediate = true {product}
  116. uintx CMSRescanMultiple = 32 {product}
  117. uintx CMSSamplingGrain = 16384 {product}
  118. bool CMSScavengeBeforeRemark = false {product}
  119. uintx CMSScheduleRemarkEdenPenetration = 50 {product}
  120. uintx CMSScheduleRemarkEdenSizeThreshold = 2097152 {product}
  121. uintx CMSScheduleRemarkSamplingRatio = 5 {product}
  122. double CMSSmallCoalSurplusPercent = 1.050000 {product}
  123. double CMSSmallSplitSurplusPercent = 1.100000 {product}
  124. bool CMSSplitIndexedFreeListBlocks = true {product}
  125. intx CMSTriggerInterval = -1 {manageable}
  126. uintx CMSTriggerRatio = 80 {product}
  127. intx CMSWaitDuration = 2000 {manageable}
  128. uintx CMSWorkQueueDrainThreshold = 10 {product}
  129. bool CMSYield = true {product}
  130. uintx CMSYieldSleepCount = 0 {product}
  131. uintx CMSYoungGenPerWorker = 67108864 {pd product}
  132. uintx CMS_FLSPadding = 1 {product}
  133. uintx CMS_FLSWeight = 75 {product}
  134. uintx CMS_SweepPadding = 1 {product}
  135. uintx CMS_SweepTimerThresholdMillis = 10 {product}
  136. uintx CMS_SweepWeight = 75 {product}
  137. bool CheckEndorsedAndExtDirs = false {product}
  138. bool CheckJNICalls = false {product}
  139. bool ClassUnloading = true {product}
  140. bool ClassUnloadingWithConcurrentMark = true {product}
  141. intx ClearFPUAtPark = 0 {product}
  142. bool ClipInlining = true {product}
  143. uintx CodeCacheExpansionSize = 65536 {pd product}
  144. uintx CodeCacheMinimumFreeSpace = 512000 {product}
  145. bool CollectGen0First = false {product}
  146. bool CompactFields = true {product}
  147. intx CompilationPolicyChoice = 3 {product}
  148. ccstrlist CompileCommand = {product}
  149. ccstr CompileCommandFile = {product}
  150. ccstrlist CompileOnly = {product}
  151. intx CompileThreshold = 10000 {pd product}
  152. bool CompilerThreadHintNoPreempt = true {product}
  153. intx CompilerThreadPriority = -1 {product}
  154. intx CompilerThreadStackSize = 0 {pd product}
  155. uintx CompressedClassSpaceSize = 1073741824 {product}
  156. uintx ConcGCThreads = 0 {product}
  157. intx ConditionalMoveLimit = 3 {C2 pd product}
  158. intx ContendedPaddingWidth = 128 {product}
  159. bool ConvertSleepToYield = true {pd product}
  160. bool ConvertYieldToSleep = false {product}
  161. bool CrashOnOutOfMemoryError = false {product}
  162. bool CreateMinidumpOnCrash = false {product}
  163. bool CriticalJNINatives = true {product}
  164. bool DTraceAllocProbes = false {product}
  165. bool DTraceMethodProbes = false {product}
  166. bool DTraceMonitorProbes = false {product}
  167. bool Debugging = false {product}
  168. uintx DefaultMaxRAMFraction = 4 {product}
  169. intx DefaultThreadPriority = -1 {product}
  170. intx DeferPollingPageLoopCount = -1 {product}
  171. intx DeferThrSuspendLoopCount = 4000 {product}
  172. bool DeoptimizeRandom = false {product}
  173. bool DisableAttachMechanism = false {product}
  174. bool DisableExplicitGC = false {product}
  175. bool DisplayVMOutputToStderr = false {product}
  176. bool DisplayVMOutputToStdout = false {product}
  177. bool DoEscapeAnalysis = true {C2 product}
  178. bool DontCompileHugeMethods = true {product}
  179. bool DontYieldALot = false {pd product}
  180. ccstr DumpLoadedClassList = {product}
  181. bool DumpReplayDataOnError = true {product}
  182. bool DumpSharedSpaces = false {product}
  183. bool EagerXrunInit = false {product}
  184. intx EliminateAllocationArraySizeLimit = 64 {C2 product}
  185. bool EliminateAllocations = true {C2 product}
  186. bool EliminateAutoBox = true {C2 product}
  187. bool EliminateLocks = true {C2 product}
  188. bool EliminateNestedLocks = true {C2 product}
  189. intx EmitSync = 0 {product}
  190. bool EnableContended = true {product}
  191. bool EnableResourceManagementTLABCache = true {product}
  192. bool EnableSharedLookupCache = true {product}
  193. bool EnableTracing = false {product}
  194. uintx ErgoHeapSizeLimit = 0 {product}
  195. ccstr ErrorFile = {product}
  196. ccstr ErrorReportServer = {product}
  197. double EscapeAnalysisTimeout = 20.000000 {C2 product}
  198. bool EstimateArgEscape = true {product}
  199. bool ExitOnOutOfMemoryError = false {product}
  200. bool ExplicitGCInvokesConcurrent = false {product}
  201. bool ExplicitGCInvokesConcurrentAndUnloadsClasses = false {product}
  202. bool ExtendedDTraceProbes = false {product}
  203. ccstr ExtraSharedClassListFile = {product}
  204. bool FLSAlwaysCoalesceLarge = false {product}
  205. uintx FLSCoalescePolicy = 2 {product}
  206. double FLSLargestBlockCoalesceProximity = 0.990000 {product}
  207. bool FailOverToOldVerifier = true {product}
  208. bool FastTLABRefill = true {product}
  209. intx FenceInstruction = 0 {ARCH product}
  210. intx FieldsAllocationStyle = 1 {product}
  211. bool FilterSpuriousWakeups = true {product}
  212. ccstr FlightRecorderOptions = {product}
  213. bool ForceNUMA = false {product}
  214. bool ForceTimeHighResolution = false {product}
  215. intx FreqInlineSize = 325 {pd product}
  216. double G1ConcMarkStepDurationMillis = 10.000000 {product}
  217. uintx G1ConcRSHotCardLimit = 4 {product}
  218. uintx G1ConcRSLogCacheSize = 10 {product}
  219. intx G1ConcRefinementGreenZone = 0 {product}
  220. intx G1ConcRefinementRedZone = 0 {product}
  221. intx G1ConcRefinementServiceIntervalMillis = 300 {product}
  222. uintx G1ConcRefinementThreads = 0 {product}
  223. intx G1ConcRefinementThresholdStep = 0 {product}
  224. intx G1ConcRefinementYellowZone = 0 {product}
  225. uintx G1ConfidencePercent = 50 {product}
  226. uintx G1HeapRegionSize = 0 {product}
  227. uintx G1HeapWastePercent = 5 {product}
  228. uintx G1MixedGCCountTarget = 8 {product}
  229. intx G1RSetRegionEntries = 0 {product}
  230. uintx G1RSetScanBlockSize = 64 {product}
  231. intx G1RSetSparseRegionEntries = 0 {product}
  232. intx G1RSetUpdatingPauseTimePercent = 10 {product}
  233. intx G1RefProcDrainInterval = 10 {product}
  234. uintx G1ReservePercent = 10 {product}
  235. uintx G1SATBBufferEnqueueingThresholdPercent = 60 {product}
  236. intx G1SATBBufferSize = 1024 {product}
  237. intx G1UpdateBufferSize = 256 {product}
  238. bool G1UseAdaptiveConcRefinement = true {product}
  239. uintx GCDrainStackTargetSize = 64 {product}
  240. uintx GCHeapFreeLimit = 2 {product}
  241. uintx GCLockerEdenExpansionPercent = 5 {product}
  242. bool GCLockerInvokesConcurrent = false {product}
  243. uintx GCLogFileSize = 8192 {product}
  244. uintx GCPauseIntervalMillis = 0 {product}
  245. uintx GCTaskTimeStampEntries = 200 {product}
  246. uintx GCTimeLimit = 98 {product}
  247. uintx GCTimeRatio = 99 {product}
  248. uintx HeapBaseMinAddress = 2147483648 {pd product}
  249. bool HeapDumpAfterFullGC = false {manageable}
  250. bool HeapDumpBeforeFullGC = false {manageable}
  251. bool HeapDumpOnOutOfMemoryError = false {manageable}
  252. ccstr HeapDumpPath = {manageable}
  253. uintx HeapFirstMaximumCompactionCount = 3 {product}
  254. uintx HeapMaximumCompactionInterval = 20 {product}
  255. uintx HeapSizePerGCThread = 87241520 {product}
  256. bool IgnoreEmptyClassPaths = false {product}
  257. bool IgnoreUnrecognizedVMOptions = false {product}
  258. uintx IncreaseFirstTierCompileThresholdAt = 50 {product}
  259. bool IncrementalInline = true {C2 product}
  260. uintx InitialBootClassLoaderMetaspaceSize = 4194304 {product}
  261. uintx InitialCodeCacheSize = 2555904 {pd product}
  262. uintx InitialHeapSize := 134217728 {product}
  263. uintx InitialRAMFraction = 64 {product}
  264. uintx InitialSurvivorRatio = 8 {product}
  265. uintx InitialTenuringThreshold = 7 {product}
  266. uintx InitiatingHeapOccupancyPercent = 45 {product}
  267. bool Inline = true {product}
  268. ccstr InlineDataFile = {product}
  269. intx InlineSmallCode = 2000 {pd product}
  270. bool InlineSynchronizedMethods = true {C1 product}
  271. bool InsertMemBarAfterArraycopy = true {C2 product}
  272. intx InteriorEntryAlignment = 16 {C2 pd product}
  273. intx InterpreterProfilePercentage = 33 {product}
  274. bool JNIDetachReleasesMonitors = true {product}
  275. bool JavaMonitorsInStackTrace = true {product}
  276. intx JavaPriority10_To_OSPriority = -1 {product}
  277. intx JavaPriority1_To_OSPriority = -1 {product}
  278. intx JavaPriority2_To_OSPriority = -1 {product}
  279. intx JavaPriority3_To_OSPriority = -1 {product}
  280. intx JavaPriority4_To_OSPriority = -1 {product}
  281. intx JavaPriority5_To_OSPriority = -1 {product}
  282. intx JavaPriority6_To_OSPriority = -1 {product}
  283. intx JavaPriority7_To_OSPriority = -1 {product}
  284. intx JavaPriority8_To_OSPriority = -1 {product}
  285. intx JavaPriority9_To_OSPriority = -1 {product}
  286. bool LIRFillDelaySlots = false {C1 pd product}
  287. uintx LargePageHeapSizeThreshold = 134217728 {product}
  288. uintx LargePageSizeInBytes = 0 {product}
  289. bool LazyBootClassLoader = true {product}
  290. intx LiveNodeCountInliningCutoff = 40000 {C2 product}
  291. bool LogCommercialFeatures = false {product}
  292. intx LoopMaxUnroll = 16 {C2 product}
  293. intx LoopOptsCount = 43 {C2 product}
  294. intx LoopUnrollLimit = 60 {C2 pd product}
  295. intx LoopUnrollMin = 4 {C2 product}
  296. bool LoopUnswitching = true {C2 product}
  297. bool ManagementServer = false {product}
  298. uintx MarkStackSize = 4194304 {product}
  299. uintx MarkStackSizeMax = 536870912 {product}
  300. uintx MarkSweepAlwaysCompactCount = 4 {product}
  301. uintx MarkSweepDeadRatio = 1 {product}
  302. intx MaxBCEAEstimateLevel = 5 {product}
  303. intx MaxBCEAEstimateSize = 150 {product}
  304. uintx MaxDirectMemorySize = 0 {product}
  305. bool MaxFDLimit = true {product}
  306. uintx MaxGCMinorPauseMillis = 18446744073709551615 {product}
  307. uintx MaxGCPauseMillis = 18446744073709551615 {product}
  308. uintx MaxHeapFreeRatio = 100 {manageable}
  309. uintx MaxHeapSize := 2147483648 {product}
  310. intx MaxInlineLevel = 9 {product}
  311. intx MaxInlineSize = 35 {product}
  312. intx MaxJNILocalCapacity = 65536 {product}
  313. intx MaxJavaStackTraceDepth = 1024 {product}
  314. intx MaxJumpTableSize = 65000 {C2 product}
  315. intx MaxJumpTableSparseness = 5 {C2 product}
  316. intx MaxLabelRootDepth = 1100 {C2 product}
  317. intx MaxLoopPad = 11 {C2 product}
  318. uintx MaxMetaspaceExpansion = 5451776 {product}
  319. uintx MaxMetaspaceFreeRatio = 70 {product}
  320. uintx MaxMetaspaceSize = 18446744073709547520 {product}
  321. uintx MaxNewSize := 715653120 {product}
  322. intx MaxNodeLimit = 75000 {C2 product}
  323. uint64_t MaxRAM = 137438953472 {pd product}
  324. uintx MaxRAMFraction = 4 {product}
  325. intx MaxRecursiveInlineLevel = 1 {product}
  326. uintx MaxTenuringThreshold = 15 {product}
  327. intx MaxTrivialSize = 6 {product}
  328. intx MaxVectorSize = 32 {C2 product}
  329. uintx MetaspaceSize = 21807104 {pd product}
  330. bool MethodFlushing = true {product}
  331. uintx MinHeapDeltaBytes := 524288 {product}
  332. uintx MinHeapFreeRatio = 0 {manageable}
  333. intx MinInliningThreshold = 250 {product}
  334. intx MinJumpTableSize = 10 {C2 pd product}
  335. uintx MinMetaspaceExpansion = 339968 {product}
  336. uintx MinMetaspaceFreeRatio = 40 {product}
  337. uintx MinRAMFraction = 2 {product}
  338. uintx MinSurvivorRatio = 3 {product}
  339. uintx MinTLABSize = 2048 {product}
  340. intx MonitorBound = 0 {product}
  341. bool MonitorInUseLists = false {product}
  342. intx MultiArrayExpandLimit = 6 {C2 product}
  343. bool MustCallLoadClassInternal = false {product}
  344. uintx NUMAChunkResizeWeight = 20 {product}
  345. uintx NUMAInterleaveGranularity = 2097152 {product}
  346. uintx NUMAPageScanRate = 256 {product}
  347. uintx NUMASpaceResizeRate = 1073741824 {product}
  348. bool NUMAStats = false {product}
  349. ccstr NativeMemoryTracking = off {product}
  350. bool NeedsDeoptSuspend = false {pd product}
  351. bool NeverActAsServerClassMachine = false {pd product}
  352. bool NeverTenure = false {product}
  353. uintx NewRatio = 2 {product}
  354. uintx NewSize := 44564480 {product}
  355. uintx NewSizeThreadIncrease = 5320 {pd product}
  356. intx NmethodSweepActivity = 10 {product}
  357. intx NmethodSweepCheckInterval = 5 {product}
  358. intx NmethodSweepFraction = 16 {product}
  359. intx NodeLimitFudgeFactor = 2000 {C2 product}
  360. uintx NumberOfGCLogFiles = 0 {product}
  361. intx NumberOfLoopInstrToAlign = 4 {C2 product}
  362. intx ObjectAlignmentInBytes = 8 {lp64_product}
  363. uintx OldPLABSize = 1024 {product}
  364. uintx OldPLABWeight = 50 {product}
  365. uintx OldSize := 89653248 {product}
  366. bool OmitStackTraceInFastThrow = true {product}
  367. ccstrlist OnError = {product}
  368. ccstrlist OnOutOfMemoryError = {product}
  369. intx OnStackReplacePercentage = 140 {pd product}
  370. bool OptimizeFill = true {C2 product}
  371. bool OptimizePtrCompare = true {C2 product}
  372. bool OptimizeStringConcat = true {C2 product}
  373. bool OptoBundling = false {C2 pd product}
  374. intx OptoLoopAlignment = 16 {pd product}
  375. bool OptoScheduling = false {C2 pd product}
  376. uintx PLABWeight = 75 {product}
  377. bool PSChunkLargeArrays = true {product}
  378. intx ParGCArrayScanChunk = 50 {product}
  379. uintx ParGCDesiredObjsFromOverflowList = 20 {product}
  380. bool ParGCTrimOverflow = true {product}
  381. bool ParGCUseLocalOverflow = false {product}
  382. uintx ParallelGCBufferWastePct = 10 {product}
  383. uintx ParallelGCThreads = 4 {product}
  384. bool ParallelGCVerbose = false {product}
  385. uintx ParallelOldDeadWoodLimiterMean = 50 {product}
  386. uintx ParallelOldDeadWoodLimiterStdDev = 80 {product}
  387. bool ParallelRefProcBalancingEnabled = true {product}
  388. bool ParallelRefProcEnabled = false {product}
  389. bool PartialPeelAtUnsignedTests = true {C2 product}
  390. bool PartialPeelLoop = true {C2 product}
  391. intx PartialPeelNewPhiDelta = 0 {C2 product}
  392. uintx PausePadding = 1 {product}
  393. intx PerBytecodeRecompilationCutoff = 200 {product}
  394. intx PerBytecodeTrapLimit = 4 {product}
  395. intx PerMethodRecompilationCutoff = 400 {product}
  396. intx PerMethodTrapLimit = 100 {product}
  397. bool PerfAllowAtExitRegistration = false {product}
  398. bool PerfBypassFileSystemCheck = false {product}
  399. intx PerfDataMemorySize = 32768 {product}
  400. intx PerfDataSamplingInterval = 50 {product}
  401. ccstr PerfDataSaveFile = {product}
  402. bool PerfDataSaveToFile = false {product}
  403. bool PerfDisableSharedMem = false {product}
  404. intx PerfMaxStringConstLength = 1024 {product}
  405. intx PreInflateSpin = 10 {pd product}
  406. bool PreferInterpreterNativeStubs = false {pd product}
  407. intx PrefetchCopyIntervalInBytes = 576 {product}
  408. intx PrefetchFieldsAhead = 1 {product}
  409. intx PrefetchScanIntervalInBytes = 576 {product}
  410. bool PreserveAllAnnotations = false {product}
  411. bool PreserveFramePointer = false {pd product}
  412. uintx PretenureSizeThreshold = 0 {product}
  413. bool PrintAdaptiveSizePolicy = false {product}
  414. bool PrintCMSInitiationStatistics = false {product}
  415. intx PrintCMSStatistics = 0 {product}
  416. bool PrintClassHistogram = false {manageable}
  417. bool PrintClassHistogramAfterFullGC = false {manageable}
  418. bool PrintClassHistogramBeforeFullGC = false {manageable}
  419. bool PrintCodeCache = false {product}
  420. bool PrintCodeCacheOnCompilation = false {product}
  421. bool PrintCommandLineFlags = false {product}
  422. bool PrintCompilation = false {product}
  423. bool PrintConcurrentLocks = false {manageable}
  424. intx PrintFLSCensus = 0 {product}
  425. intx PrintFLSStatistics = 0 {product}
  426. bool PrintFlagsFinal := true {product}
  427. bool PrintFlagsInitial = false {product}
  428. bool PrintGC = false {manageable}
  429. bool PrintGCApplicationConcurrentTime = false {product}
  430. bool PrintGCApplicationStoppedTime = false {product}
  431. bool PrintGCCause = true {product}
  432. bool PrintGCDateStamps = false {manageable}
  433. bool PrintGCDetails = false {manageable}
  434. bool PrintGCID = false {manageable}
  435. bool PrintGCTaskTimeStamps = false {product}
  436. bool PrintGCTimeStamps = false {manageable}
  437. bool PrintHeapAtGC = false {product rw}
  438. bool PrintHeapAtGCExtended = false {product rw}
  439. bool PrintHeapAtSIGBREAK = true {product}
  440. bool PrintJNIGCStalls = false {product}
  441. bool PrintJNIResolving = false {product}
  442. bool PrintOldPLAB = false {product}
  443. bool PrintOopAddress = false {product}
  444. bool PrintPLAB = false {product}
  445. bool PrintParallelOldGCPhaseTimes = false {product}
  446. bool PrintPromotionFailure = false {product}
  447. bool PrintReferenceGC = false {product}
  448. bool PrintSafepointStatistics = false {product}
  449. intx PrintSafepointStatisticsCount = 300 {product}
  450. intx PrintSafepointStatisticsTimeout = -1 {product}
  451. bool PrintSharedArchiveAndExit = false {product}
  452. bool PrintSharedDictionary = false {product}
  453. bool PrintSharedSpaces = false {product}
  454. bool PrintStringDeduplicationStatistics = false {product}
  455. bool PrintStringTableStatistics = false {product}
  456. bool PrintTLAB = false {product}
  457. bool PrintTenuringDistribution = false {product}
  458. bool PrintTieredEvents = false {product}
  459. bool PrintVMOptions = false {product}
  460. bool PrintVMQWaitTime = false {product}
  461. bool PrintWarnings = true {product}
  462. uintx ProcessDistributionStride = 4 {product}
  463. bool ProfileInterpreter = true {pd product}
  464. bool ProfileIntervals = false {product}
  465. intx ProfileIntervalsTicks = 100 {product}
  466. intx ProfileMaturityPercentage = 20 {product}
  467. bool ProfileVM = false {product}
  468. bool ProfilerPrintByteCodeStatistics = false {product}
  469. bool ProfilerRecordPC = false {product}
  470. uintx PromotedPadding = 3 {product}
  471. uintx QueuedAllocationWarningCount = 0 {product}
  472. uintx RTMRetryCount = 5 {ARCH product}
  473. bool RangeCheckElimination = true {product}
  474. intx ReadPrefetchInstr = 0 {ARCH product}
  475. bool ReassociateInvariants = true {C2 product}
  476. bool ReduceBulkZeroing = true {C2 product}
  477. bool ReduceFieldZeroing = true {C2 product}
  478. bool ReduceInitialCardMarks = true {C2 product}
  479. bool ReduceSignalUsage = false {product}
  480. intx RefDiscoveryPolicy = 0 {product}
  481. bool ReflectionWrapResolutionErrors = true {product}
  482. bool RegisterFinalizersAtInit = true {product}
  483. bool RelaxAccessControlCheck = false {product}
  484. ccstr ReplayDataFile = {product}
  485. bool RequireSharedSpaces = false {product}
  486. uintx ReservedCodeCacheSize = 251658240 {pd product}
  487. bool ResizeOldPLAB = true {product}
  488. bool ResizePLAB = true {product}
  489. bool ResizeTLAB = true {pd product}
  490. bool RestoreMXCSROnJNICalls = false {product}
  491. bool RestrictContended = true {product}
  492. bool RewriteBytecodes = true {pd product}
  493. bool RewriteFrequentPairs = true {pd product}
  494. intx SafepointPollOffset = 256 {C1 pd product}
  495. intx SafepointSpinBeforeYield = 2000 {product}
  496. bool SafepointTimeout = false {product}
  497. intx SafepointTimeoutDelay = 10000 {product}
  498. bool ScavengeBeforeFullGC = true {product}
  499. intx SelfDestructTimer = 0 {product}
  500. uintx SharedBaseAddress = 34359738368 {product}
  501. ccstr SharedClassListFile = {product}
  502. uintx SharedMiscCodeSize = 122880 {product}
  503. uintx SharedMiscDataSize = 4194304 {product}
  504. uintx SharedReadOnlySize = 16777216 {product}
  505. uintx SharedReadWriteSize = 16777216 {product}
  506. bool ShowMessageBoxOnError = false {product}
  507. intx SoftRefLRUPolicyMSPerMB = 1000 {product}
  508. bool SpecialEncodeISOArray = true {C2 product}
  509. bool SplitIfBlocks = true {C2 product}
  510. intx StackRedPages = 1 {pd product}
  511. intx StackShadowPages = 20 {pd product}
  512. bool StackTraceInThrowable = true {product}
  513. intx StackYellowPages = 2 {pd product}
  514. bool StartAttachListener = false {product}
  515. intx StarvationMonitorInterval = 200 {product}
  516. bool StressLdcRewrite = false {product}
  517. uintx StringDeduplicationAgeThreshold = 3 {product}
  518. uintx StringTableSize = 60013 {product}
  519. bool SuppressFatalErrorMessage = false {product}
  520. uintx SurvivorPadding = 3 {product}
  521. uintx SurvivorRatio = 8 {product}
  522. intx SuspendRetryCount = 50 {product}
  523. intx SuspendRetryDelay = 5 {product}
  524. intx SyncFlags = 0 {product}
  525. ccstr SyncKnobs = {product}
  526. intx SyncVerbose = 0 {product}
  527. uintx TLABAllocationWeight = 35 {product}
  528. uintx TLABRefillWasteFraction = 64 {product}
  529. uintx TLABSize = 0 {product}
  530. bool TLABStats = true {product}
  531. uintx TLABWasteIncrement = 4 {product}
  532. uintx TLABWasteTargetPercent = 1 {product}
  533. uintx TargetPLABWastePct = 10 {product}
  534. uintx TargetSurvivorRatio = 50 {product}
  535. uintx TenuredGenerationSizeIncrement = 20 {product}
  536. uintx TenuredGenerationSizeSupplement = 80 {product}
  537. uintx TenuredGenerationSizeSupplementDecay = 2 {product}
  538. intx ThreadPriorityPolicy = 0 {product}
  539. bool ThreadPriorityVerbose = false {product}
  540. uintx ThreadSafetyMargin = 52428800 {product}
  541. intx ThreadStackSize = 1024 {pd product}
  542. uintx ThresholdTolerance = 10 {product}
  543. intx Tier0BackedgeNotifyFreqLog = 10 {product}
  544. intx Tier0InvokeNotifyFreqLog = 7 {product}
  545. intx Tier0ProfilingStartPercentage = 200 {product}
  546. intx Tier23InlineeNotifyFreqLog = 20 {product}
  547. intx Tier2BackEdgeThreshold = 0 {product}
  548. intx Tier2BackedgeNotifyFreqLog = 14 {product}
  549. intx Tier2CompileThreshold = 0 {product}
  550. intx Tier2InvokeNotifyFreqLog = 11 {product}
  551. intx Tier3BackEdgeThreshold = 60000 {product}
  552. intx Tier3BackedgeNotifyFreqLog = 13 {product}
  553. intx Tier3CompileThreshold = 2000 {product}
  554. intx Tier3DelayOff = 2 {product}
  555. intx Tier3DelayOn = 5 {product}
  556. intx Tier3InvocationThreshold = 200 {product}
  557. intx Tier3InvokeNotifyFreqLog = 10 {product}
  558. intx Tier3LoadFeedback = 5 {product}
  559. intx Tier3MinInvocationThreshold = 100 {product}
  560. intx Tier4BackEdgeThreshold = 40000 {product}
  561. intx Tier4CompileThreshold = 15000 {product}
  562. intx Tier4InvocationThreshold = 5000 {product}
  563. intx Tier4LoadFeedback = 3 {product}
  564. intx Tier4MinInvocationThreshold = 600 {product}
  565. bool TieredCompilation = true {pd product}
  566. intx TieredCompileTaskTimeout = 50 {product}
  567. intx TieredRateUpdateMaxTime = 25 {product}
  568. intx TieredRateUpdateMinTime = 1 {product}
  569. intx TieredStopAtLevel = 4 {product}
  570. bool TimeLinearScan = false {C1 product}
  571. bool TraceBiasedLocking = false {product}
  572. bool TraceClassLoading = false {product rw}
  573. bool TraceClassLoadingPreorder = false {product}
  574. bool TraceClassPaths = false {product}
  575. bool TraceClassResolution = false {product}
  576. bool TraceClassUnloading = false {product rw}
  577. bool TraceDynamicGCThreads = false {product}
  578. bool TraceGen0Time = false {product}
  579. bool TraceGen1Time = false {product}
  580. ccstr TraceJVMTI = {product}
  581. bool TraceLoaderConstraints = false {product rw}
  582. bool TraceMetadataHumongousAllocation = false {product}
  583. bool TraceMonitorInflation = false {product}
  584. bool TraceParallelOldGCTasks = false {product}
  585. intx TraceRedefineClasses = 0 {product}
  586. bool TraceSafepointCleanupTime = false {product}
  587. bool TraceSharedLookupCache = false {product}
  588. bool TraceSuspendWaitFailures = false {product}
  589. intx TrackedInitializationLimit = 50 {C2 product}
  590. bool TransmitErrorReport = false {product}
  591. bool TrapBasedNullChecks = false {pd product}
  592. bool TrapBasedRangeChecks = false {C2 pd product}
  593. intx TypeProfileArgsLimit = 2 {product}
  594. uintx TypeProfileLevel = 111 {pd product}
  595. intx TypeProfileMajorReceiverPercent = 90 {C2 product}
  596. intx TypeProfileParmsLimit = 2 {product}
  597. intx TypeProfileWidth = 2 {product}
  598. intx UnguardOnExecutionViolation = 0 {product}
  599. bool UnlinkSymbolsALot = false {product}
  600. bool Use486InstrsOnly = false {ARCH product}
  601. bool UseAES = true {product}
  602. bool UseAESIntrinsics = true {product}
  603. intx UseAVX = 2 {ARCH product}
  604. bool UseAdaptiveGCBoundary = false {product}
  605. bool UseAdaptiveGenerationSizePolicyAtMajorCollection = true {product}
  606. bool UseAdaptiveGenerationSizePolicyAtMinorCollection = true {product}
  607. bool UseAdaptiveNUMAChunkSizing = true {product}
  608. bool UseAdaptiveSizeDecayMajorGCCost = true {product}
  609. bool UseAdaptiveSizePolicy = true {product}
  610. bool UseAdaptiveSizePolicyFootprintGoal = true {product}
  611. bool UseAdaptiveSizePolicyWithSystemGC = false {product}
  612. bool UseAddressNop = true {ARCH product}
  613. bool UseAltSigs = false {product}
  614. bool UseAutoGCSelectPolicy = false {product}
  615. bool UseBMI1Instructions = true {ARCH product}
  616. bool UseBMI2Instructions = true {ARCH product}
  617. bool UseBiasedLocking = true {product}
  618. bool UseBimorphicInlining = true {C2 product}
  619. bool UseBoundThreads = true {product}
  620. bool UseBsdPosixThreadCPUClocks = true {product}
  621. bool UseCLMUL = true {ARCH product}
  622. bool UseCMSBestFit = true {product}
  623. bool UseCMSCollectionPassing = true {product}
  624. bool UseCMSCompactAtFullCollection = true {product}
  625. bool UseCMSInitiatingOccupancyOnly = false {product}
  626. bool UseCRC32Intrinsics = true {product}
  627. bool UseCodeCacheFlushing = true {product}
  628. bool UseCompiler = true {product}
  629. bool UseCompilerSafepoints = true {product}
  630. bool UseCompressedClassPointers := true {lp64_product}
  631. bool UseCompressedOops := true {lp64_product}
  632. bool UseConcMarkSweepGC = false {product}
  633. bool UseCondCardMark = false {C2 product}
  634. bool UseCountLeadingZerosInstruction = true {ARCH product}
  635. bool UseCountTrailingZerosInstruction = true {ARCH product}
  636. bool UseCountedLoopSafepoints = false {C2 product}
  637. bool UseCounterDecay = true {product}
  638. bool UseDivMod = true {C2 product}
  639. bool UseDynamicNumberOfGCThreads = false {product}
  640. bool UseFPUForSpilling = true {C2 product}
  641. bool UseFastAccessorMethods = false {product}
  642. bool UseFastEmptyMethods = false {product}
  643. bool UseFastJNIAccessors = true {product}
  644. bool UseFastStosb = true {ARCH product}
  645. bool UseG1GC = false {product}
  646. bool UseGCLogFileRotation = false {product}
  647. bool UseGCOverheadLimit = true {product}
  648. bool UseGCTaskAffinity = false {product}
  649. bool UseHeavyMonitors = false {product}
  650. bool UseHugeTLBFS = false {product}
  651. bool UseInlineCaches = true {product}
  652. bool UseInterpreter = true {product}
  653. bool UseJumpTables = true {C2 product}
  654. bool UseLWPSynchronization = true {product}
  655. bool UseLargePages = false {pd product}
  656. bool UseLargePagesInMetaspace = false {product}
  657. bool UseLargePagesIndividualAllocation = false {pd product}
  658. bool UseLockedTracing = false {product}
  659. bool UseLoopCounter = true {product}
  660. bool UseLoopInvariantCodeMotion = true {C1 product}
  661. bool UseLoopPredicate = true {C2 product}
  662. bool UseMathExactIntrinsics = true {C2 product}
  663. bool UseMaximumCompactionOnSystemGC = true {product}
  664. bool UseMembar = true {pd product}
  665. bool UseMontgomeryMultiplyIntrinsic = false {C2 product}
  666. bool UseMontgomerySquareIntrinsic = false {C2 product}
  667. bool UseMulAddIntrinsic = false {C2 product}
  668. bool UseMultiplyToLenIntrinsic = true {C2 product}
  669. bool UseNUMA = false {product}
  670. bool UseNUMAInterleaving = false {product}
  671. bool UseNewLongLShift = false {ARCH product}
  672. bool UseOSErrorReporting = false {pd product}
  673. bool UseOldInlining = true {C2 product}
  674. bool UseOnStackReplacement = true {pd product}
  675. bool UseOnlyInlinedBimorphic = true {C2 product}
  676. bool UseOprofile = false {product}
  677. bool UseOptoBiasInlining = true {C2 product}
  678. bool UsePSAdaptiveSurvivorSizePolicy = true {product}
  679. bool UseParNewGC = false {product}
  680. bool UseParallelGC := true {product}
  681. bool UseParallelOldGC = true {product}
  682. bool UsePerfData = true {product}
  683. bool UsePopCountInstruction = true {product}
  684. bool UseRDPCForConstantTableBase = false {C2 product}
  685. bool UseRTMDeopt = false {ARCH product}
  686. bool UseRTMLocking = false {ARCH product}
  687. bool UseSHA = false {product}
  688. bool UseSHA1Intrinsics = false {product}
  689. bool UseSHA256Intrinsics = false {product}
  690. bool UseSHA512Intrinsics = false {product}
  691. bool UseSHM = false {product}
  692. intx UseSSE = 4 {product}
  693. bool UseSSE42Intrinsics = true {product}
  694. bool UseSerialGC = false {product}
  695. bool UseSharedSpaces = false {product}
  696. bool UseSignalChaining = true {product}
  697. bool UseSquareToLenIntrinsic = false {C2 product}
  698. bool UseStoreImmI16 = false {ARCH product}
  699. bool UseStringDeduplication = false {product}
  700. bool UseSuperWord = true {C2 product}
  701. bool UseTLAB = true {pd product}
  702. bool UseThreadPriorities = true {pd product}
  703. bool UseTypeProfile = true {product}
  704. bool UseTypeSpeculation = true {C2 product}
  705. bool UseUnalignedLoadStores = true {ARCH product}
  706. bool UseVMInterruptibleIO = false {product}
  707. bool UseXMMForArrayCopy = true {product}
  708. bool UseXmmI2D = false {ARCH product}
  709. bool UseXmmI2F = false {ARCH product}
  710. bool UseXmmLoadAndClearUpper = true {ARCH product}
  711. bool UseXmmRegToRegMoveAll = true {ARCH product}
  712. bool VMThreadHintNoPreempt = false {product}
  713. intx VMThreadPriority = -1 {product}
  714. intx VMThreadStackSize = 1024 {pd product}
  715. intx ValueMapInitialSize = 11 {C1 product}
  716. intx ValueMapMaxLoopSize = 8 {C1 product}
  717. intx ValueSearchLimit = 1000 {C2 product}
  718. bool VerifyMergedCPBytecodes = true {product}
  719. bool VerifySharedSpaces = false {product}
  720. intx WorkAroundNPTLTimedWaitHang = 1 {product}
  721. uintx YoungGenerationSizeIncrement = 20 {product}
  722. uintx YoungGenerationSizeSupplement = 80 {product}
  723. uintx YoungGenerationSizeSupplementDecay = 8 {product}
  724. uintx YoungPLABSize = 4096 {product}
  725. bool ZeroTLAB = false {product}
  726. intx hashCode = 5 {product}

执行命令时把默认的执行参数打印出来:

  1. java -XX:+PrintCommandLineFlags -version

Linux下执行结果:

  1. -XX:InitialHeapSize=128123904 -XX:MaxHeapSize=2049982464 -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC
  2. java version "1.8.0_152"
  3. Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
  4. Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

InitialHeapSize:初始化内存大小
MaxHeapSize:最大内存大小
+UseCompressedClassPointers:压缩指针
+UseCompressedOops:普通对象指针

默认情况下一个默认的64位系统,指针的长度默认应该是64位(8个字节),但是如果使用了+UseCompressedClassPointers,那么指针的长度就是4个字节