参数名 |
参数类型 |
运行时类型 |
说明 |
UseCompressedOops |
bool |
lp64_product |
在64位平台开启普通对象指针(oop注1)压缩,通常64位JVM消耗的内存会比32位的大1.5倍,这是因为对象指针在64位架构下,长度会翻倍(更宽的寻址)。对于那些将要从32位平台移植到64位的应用来说,平白无辜多了1/2的内存占用,这是开发者不愿意看到的。 启用CompressOops后,会压缩的对象: 1. 每个Class的属性指针(静态成员变量) 2. 每个对象的属性指针 3. 普通对象数组的每个元素指针 当然,压缩也不是万能的,针对一些特殊类型的指针,JVM是不会优化的。 比如指向PermGen的Class对象指针,本地变量,堆栈元素,入参,返回值,NULL指针不会被压缩。 3段式,根据-Xmx/-XX:MaxHeapSize, -XX: HeapBaseMinAddress以及进程环境自动选择: // Narrow Oop encoding mode: // 0 - UnscaledNarrowOop // - Use 32-bits oops without encoding when // HeapBaseMinAddress + heap_size < 4Gb // 1 - ZeroBasedNarrowOop // - Use zero based compressed oops with encoding when // HeapBaseMinAddress + heap_size < 32Gb // 2 - HeapBasedNarrowOop // - Use compressed oops with heap base + encoding. [10][11][18][20] |
HeapBaseMinAddress |
unitx |
product_pd |
在64位平台及使用了压缩指针时有效,参见 UseCompressedOops |
UseMembar |
bool |
product |
Without UseMembar option, in Linux, Hotspot uses memory serialize page instead of memory barrier instruction. Whenever a thread state transition happens, the thread writes to a memory address in memory serialize page with volatile pointer. When the VM thread needs to look at up-to-date state of all the threads, VM changes the protection bits for the memory serialize page to read only and then recovers it to read/write to serialize state changes.The use of -XX:+UseMembar causes the VM to revert back to true memory barrier instructions. [31] |
UnlockDiagnosticVMOptions |
bool |
diagnostic |
解锁diagnostic类型的JVM参数,如PrintInlining, PrintIntrinsics等 |
UnlockExperimentalVMOptions |
bool |
experimental |
解锁experimental类型的JVM参数,如EnableMethodHandles, EnableInvokeDynamic等 |
JavaMonitorsInStackTrace |
bool |
product |
在打印Java线程堆栈信息时同时打印锁信息,如 - locked <7f30011d8> (a java.lang.ref.Reference$Lock),默认开启 |
UseLargePages |
bool |
product_pd |
使用大页内存,该特性用于优化页表缓存注2,页表缓存在计算机中是稀少的资源,使用大页可以使用页表缓存可转译更大地址空间的物理内存。 不同的CPU支持不同的页大小: i386: 4K and 4M (2M in PAE mode) ia64: 4K, 8K, 64K, 256K, 1M, 4M, 16M, 256M PPC64: 4K and 16M POWER5+: 4K, 64K, 16MB, 16GB (!!) UltraSparc III: 8K, 64K, 512K, 4M UltraSparc T2: 8K, 64K, 4M, 256M Linux在内核2.6版本以后支持大页,可以通过cat /proc/meminfo | grep Huge判断是否支持大页。 在某些应用系统中,开启使用大页有25%~300%不等的性能提升。 [21][22][23][24] |
LargePageSizeInBytes |
uintx |
product |
设置大页的大小,当为0时由HotSpot自动选择大小 |
LargePageHeapSizeThreshold |
`` |
`` |
|
UseLargePagesIndividualAllocation |
bool |
product_pd |
仅在Windows下有效,具体作用还没看明白 |
UseNUMA |
bool |
product |
使用非均匀访存模型,非均匀访存模型(NUMA)的特点是:被共享的存储器物理上是分布式的,所有这些存储器的集合就是全局地址空间。所以处理器访问这些存储器的时间是不一样的,显然访问本地存储器的速度要比访问全局共享存储器或远程访问外地存储器要快些。另外,NUMA中存储器可能是分层的:本地存储器,群内共享存储器,全局共享存储器,在HotSpot@Linux中开启需要 1. 硬件是NUMA架构的;BIOS打开了NUMA选项 2. Xen等虚拟层的NUMA选项打开(如有) 3. 操作系统的NUMA选项打开 4. libnuma.so.1存在并且可加载 5. -XX:+UseParallelGC/-XX:+UseParallelOldGC [12][13] |
ForceNUMA |
bool |
product |
强制打开UseNUMA |
NUMAChunkResizeWeight |
`` |
`` |
|
NUMASpaceResizeRate |
`` |
`` |
|
UseAdaptiveNUMAChunkSizing |
`` |
`` |
|
NUMAStats |
`` |
`` |
|
NUMAPageScanRate |
`` |
`` |
|
NeedsDeoptSuspend |
`` |
`` |
|
UseSSE |
intx |
product |
SSE(Streaming SIMD Extensions)是英特尔在AMD的3D Now!发布一年之后,在其计算机芯片Pentium III中引入的指令集,是继MMX的扩充指令集。SSE 指令集提供了 70 条新指令。AMD后来在Athlon XP中加入了对这个新指令集的支持。 其后续版本有: SSE2 SSE3 SSSE3 SSE4 现在更新至SSE4.2 SSE5 AVX FMA [25][26] |
UseSSE42Intrinsics |
bool |
product |
使用SSE4.2优化Java程序运行,打开此参数将对以下函数使用SSE4.2优化: MacroAssembler::string_compare MacroAssembler::char_arrays_equals MacroAssembler::string_indexof [27] |
ForceTimeHighResolution |
bool |
product |
仅在Windows下有效,不清楚是干什么的 |
BackgroundCompilation |
bool |
product_pd |
后台JIT编译优化启动 [32] |
PrintVMQWaitTime |
bool |
product |
打印等待执行的VMOperation的时间,当一个VMOperation有等待时间时,则打开这个VMOperation的名字和这它等待的时间(毫秒) |
MethodFlushing |
`` |
`` |
|
PrintJNIResolving |
`` |
`` |
|
UseInlineCaches |
`` |
`` |
|
SystemMathNatives |
`` |
`` |
|
DeoptimizeRandom |
`` |
`` |
|
UseCompilerSafepoints |
`` |
`` |
|
UseSplitVerifier |
`` |
`` |
|
FailOverToOldVerifier |
`` |
`` |
|
SafepointTimeout |
`` |
`` |
|
SuspendRetryCount |
`` |
`` |
|
SuspendRetryDelay |
`` |
`` |
|
AssertOnSuspendWaitFailure |
`` |
`` |
|
TraceSuspendWaitFailures |
`` |
`` |
|
MaxFDLimit |
`` |
`` |
|
BytecodeVerificationRemote |
`` |
`` |
|
BytecodeVerificationLocal |
`` |
`` |
|
PrintOopAddress |
`` |
`` |
|
PrintGCApplicationConcurrentTime |
bool |
product |
打印每次垃圾回收前,程序未中断的执行时间 [33] |
PrintGCApplicationStoppedTime |
bool |
product |
打印垃圾回收期间程序暂停的时间 [33] |
ShowMessageBoxOnError |
`` |
`` |
|
UseOSErrorReporting |
`` |
`` |
|
SuppressFatalErrorMessage |
`` |
`` |
|
OnError |
`` |
`` |
|
OnOutOfMemoryError |
`` |
`` |
|
HeapDumpBeforeFullGC |
`` |
`` |
|
HeapDumpAfterFullGC |
`` |
`` |
|
HeapDumpOnOutOfMemoryError |
`` |
`` |
|
HeapDumpPath |
`` |
`` |
|
UseVectoredExceptions |
`` |
`` |
|
PrintCompilation |
bool |
product |
是否跟踪打印JIT编译信息 [35] |
AlwaysRestoreFPU |
`` |
`` |
|
StackTraceInThrowable |
bool |
product |
当异常发生时收集异常堆栈 |
OmitStackTraceInFastThrow |
bool |
product |
在已经优化过(编译为本地代码)的代码中对经常抛出的异常不收集堆栈 |
ProfilerPrintByteCodeStatistics |
`` |
`` |
|
ProfilerRecordPC |
`` |
`` |
|
ProfileVM |
`` |
`` |
|
ProfileIntervals |
`` |
`` |
|
PrintWarnings |
`` |
`` |
|
RegisterFinalizersAtInit |
`` |
`` |
|
ClassUnloading |
`` |
`` |
|
AlwaysLockClassLoader |
`` |
`` |
|
AllowParallelDefineClass |
`` |
`` |
|
MustCallLoadClassInternal |
`` |
`` |
|
DontYieldALot |
`` |
`` |
|
UseBoundThreads |
bool |
product |
绑定用户级线程(Solaris only),这个选项强制所有的Java线程在创建时都作为操作系统绑定的线程 [35] |
UseLWPSynchronization |
`` |
`` |
|
SyncKnobs |
`` |
`` |
|
EmitSync |
`` |
`` |
|
AlwaysInflate |
`` |
`` |
|
MonitorBound |
`` |
`` |
|
MonitorInUseLists |
`` |
`` |
|
Atomics |
`` |
`` |
|
FenceInstruction |
`` |
`` |
|
SyncFlags |
`` |
`` |
|
SyncVerbose |
`` |
`` |
|
ClearFPUAtPark |
`` |
`` |
|
hashCode |
intx |
product |
计算HashCode(即Object#hashCode,System#identityHashCode)的模式选择,参见:synchronizer.cpp#get_next_hash |
WorkAroundNPTLTimedWaitHang |
`` |
`` |
|
FilterSpuriousWakeups |
`` |
`` |
|
NativeMonitorTimeout |
`` |
`` |
|
NativeMonitorFlags |
`` |
`` |
|
NativeMonitorSpinLimit |
`` |
`` |
|
AdjustConcurrency |
`` |
`` |
|
ReduceSignalUsage |
`` |
`` |
|
AllowUserSignalHandlers |
bool |
product |
允许用户在应用层设置信号处理回调函数 [35] |
UseSignalChaining |
`` |
`` |
|
UseAltSigs |
`` |
`` |
|
UseSpinning |
bool |
product |
启用多线程自旋锁优化。详见 HotSpot词汇表-自适应自旋 [19] |
PreSpinYield |
`` |
`` |
|
PostSpinYield |
`` |
`` |
|
AllowJNIEnvProxy |
`` |
`` |
|
JNIDetachReleasesMonitors |
`` |
`` |
|
RestoreMXCSROnJNICalls |
`` |
`` |
|
CheckJNICalls |
`` |
`` |
|
UseFastJNIAccessors |
`` |
`` |
|
EagerXrunInit |
`` |
`` |
|
PreserveAllAnnotations |
`` |
`` |
|
LazyBootClassLoader |
`` |
`` |
|
UseNewLongLShift |
`` |
`` |
|
UseStoreImmI16 |
`` |
`` |
|
UseAddressNop |
`` |
`` |
|
UseXmmLoadAndClearUpper |
`` |
`` |
|
UseXmmRegToRegMoveAll |
`` |
`` |
|
UseXmmI2D |
`` |
`` |
|
UseXmmI2F |
`` |
`` |
|
UseXMMForArrayCopy |
`` |
`` |
|
UseUnalignedLoadStores |
`` |
`` |
|
FieldsAllocationStyle |
`` |
`` |
|
CompactFields |
`` |
`` |
|
UseBiasedLocking |
`` |
`` |
|
BiasedLockingStartupDelay |
`` |
`` |
|
BiasedLockingBulkRebiasThreshold |
`` |
`` |
|
BiasedLockingBulkRevokeThreshold |
`` |
`` |
|
BiasedLockingDecayTime |
`` |
`` |
|
TraceJVMTI |
`` |
`` |
|
StressLdcRewrite |
`` |
`` |
|
TraceRedefineClasses |
`` |
`` |
|
VerifyMergedCPBytecodes |
`` |
`` |
|
HPILibPath |
`` |
`` |
|
TraceClassResolution |
`` |
`` |
|
TraceBiasedLocking |
`` |
`` |
|
TraceMonitorInflation |
`` |
`` |
|
Use486InstrsOnly |
`` |
`` |
|
UseSerialGC |
`` |
`` |
|
UseG1GC |
`` |
`` |
|
UseParallelGC |
`` |
`` |
|
UseParallelOldGC |
`` |
`` |
|
UseParallelOldGCCompacting |
`` |
`` |
|
UseParallelDensePrefixUpdate |
`` |
`` |
|
HeapMaximumCompactionInterval |
`` |
`` |
|
HeapFirstMaximumCompactionCount |
`` |
`` |
|
UseMaximumCompactionOnSystemGC |
`` |
`` |
|
ParallelOldDeadWoodLimiterMean |
`` |
`` |
|
ParallelOldDeadWoodLimiterStdDev |
`` |
`` |
|
UseParallelOldGCDensePrefix |
`` |
`` |
|
ParallelGCThreads |
uintx |
product |
并行收集器的线程数,此值最好配置与处理器数目相等 同样适用于CMS [33] |
ConcGCThreads |
unitx |
product |
CMS收集器的线程数 |
YoungPLABSize |
`` |
`` |
|
OldPLABSize |
`` |
`` |
|
GCTaskTimeStampEntries |
`` |
`` |
|
AlwaysTenure |
bool |
product |
是否使用Surivor空间,当为真时Surivor空间不存放任何对象 |
NeverTenure |
`` |
`` |
|
ScavengeBeforeFullGC |
`` |
`` |
|
UseConcMarkSweepGC |
`` |
`` |
|
ExplicitGCInvokesConcurrent |
`` |
`` |
|
ExplicitGCInvokesConcurrentAndUnloadsClasses |
`` |
`` |
|
GCLockerInvokesConcurrent |
`` |
`` |
|
GCLockerEdenExpansionPercent |
`` |
`` |
|
UseCMSBestFit |
`` |
`` |
|
UseCMSCollectionPassing |
`` |
`` |
|
UseParNewGC |
`` |
`` |
|
ParallelGCVerbose |
`` |
`` |
|
ParallelGCBufferWastePct |
`` |
`` |
|
ParallelGCRetainPLAB |
`` |
`` |
|
TargetPLABWastePct |
`` |
`` |
|
PLABWeight |
`` |
`` |
|
ResizePLAB |
`` |
`` |
|
PrintPLAB |
`` |
`` |
|
ParGCArrayScanChunk |
`` |
`` |
|
ParGCUseLocalOverflow |
`` |
`` |
|
ParGCTrimOverflow |
`` |
`` |
|
ParGCDesiredObjsFromOverflowList |
`` |
`` |
|
CMSParPromoteBlocksToClaim |
`` |
`` |
|
OldPLABWeight |
`` |
`` |
|
ResizeOldPLAB |
`` |
`` |
|
PrintOldPLAB |
`` |
`` |
|
CMSOldPLABMin |
`` |
`` |
|
CMSOldPLABMax |
`` |
`` |
|
CMSOldPLABNumRefills |
`` |
`` |
|
CMSOldPLABResizeQuicker |
`` |
`` |
|
CMSOldPLABToleranceFactor |
`` |
`` |
|
CMSOldPLABReactivityFactor |
`` |
`` |
|
CMSOldPLABReactivityCeiling |
`` |
`` |
|
AlwaysPreTouch |
`` |
`` |
|
CMSUseOldDefaults |
`` |
`` |
|
CMSYoungGenPerWorker |
`` |
`` |
|
GCOverheadReporting |
`` |
`` |
|
GCOverheadReportingPeriodMS |
`` |
`` |
|
CMSIncrementalMode |
`` |
`` |
|
CMSIncrementalDutyCycle |
`` |
`` |
|
CMSIncrementalPacing |
`` |
`` |
|
CMSIncrementalDutyCycleMin |
`` |
`` |
|
CMSIncrementalSafetyFactor |
`` |
`` |
|
CMSIncrementalOffset |
`` |
`` |
|
CMSExpAvgFactor |
`` |
`` |
|
CMS_FLSWeight |
`` |
`` |
|
CMS_FLSPadding |
`` |
`` |
|
FLSCoalescePolicy |
`` |
`` |
|
FLSAlwaysCoalesceLarge |
`` |
`` |
|
CMSExtrapolateSweep |
`` |
`` |
|
CMS_SweepWeight |
`` |
`` |
|
CMS_SweepPadding |
`` |
`` |
|
CMS_SweepTimerThresholdMillis |
`` |
`` |
|
CMSClassUnloadingEnabled |
`` |
`` |
|
CMSClassUnloadingMaxInterval |
`` |
`` |
|
CMSCompactWhenClearAllSoftRefs |
`` |
`` |
|
UseCMSCompactAtFullCollection |
`` |
`` |
|
CMSFullGCsBeforeCompaction |
`` |
`` |
|
CMSIndexedFreeListReplenish |
`` |
`` |
|
CMSReplenishIntermediate |
`` |
`` |
|
CMSSplitIndexedFreeListBlocks |
`` |
`` |
|
CMSLoopWarn |
`` |
`` |
|
MarkStackSize |
`` |
`` |
|
MarkStackSizeMax |
`` |
`` |
|
CMSMaxAbortablePrecleanLoops |
`` |
`` |
|
CMSMaxAbortablePrecleanTime |
`` |
`` |
|
CMSAbortablePrecleanMinWorkPerIteration |
`` |
`` |
|
CMSAbortablePrecleanWaitMillis |
`` |
`` |
|
CMSRescanMultiple |
`` |
`` |
|
CMSConcMarkMultiple |
`` |
`` |
|
CMSRevisitStackSize |
`` |
`` |
|
CMSAbortSemantics |
`` |
`` |
|
CMSParallelRemarkEnabled |
`` |
`` |
|
CMSParallelSurvivorRemarkEnabled |
`` |
`` |
|
CMSPLABRecordAlways |
`` |
`` |
|
CMSConcurrentMTEnabled |
`` |
`` |
|
CMSPermGenPrecleaningEnabled |
`` |
`` |
|
CMSPrecleaningEnabled |
`` |
`` |
|
CMSPrecleanIter |
`` |
`` |
|
CMSPrecleanNumerator |
`` |
`` |
|
CMSPrecleanDenominator |
`` |
`` |
|
CMSPrecleanRefLists1 |
`` |
`` |
|
CMSPrecleanRefLists2 |
`` |
`` |
|
CMSPrecleanSurvivors1 |
`` |
`` |
|
CMSPrecleanSurvivors2 |
`` |
`` |
|
CMSPrecleanThreshold |
`` |
`` |
|
CMSCleanOnEnter |
`` |
`` |
|
CMSRemarkVerifyVariant |
`` |
`` |
|
CMSScheduleRemarkEdenSizeThreshold |
`` |
`` |
|
CMSScheduleRemarkEdenPenetration |
`` |
`` |
|
CMSScheduleRemarkSamplingRatio |
`` |
`` |
|
CMSSamplingGrain |
`` |
`` |
|
CMSScavengeBeforeRemark |
`` |
`` |
|
CMSWorkQueueDrainThreshold |
`` |
`` |
|
CMSWaitDuration |
`` |
`` |
|
CMSYield |
`` |
`` |
|
CMSBitMapYieldQuantum |
`` |
`` |
|
CMSDumpAtPromotionFailure |
`` |
`` |
|
CMSPrintChunksInDump |
`` |
`` |
|
CMSPrintObjectsInDump |
`` |
`` |
|
BlockOffsetArrayUseUnallocatedBlock |
`` |
`` |
|
RefDiscoveryPolicy |
`` |
`` |
|
ParallelRefProcEnabled |
`` |
`` |
|
ParallelRefProcBalancingEnabled |
`` |
`` |
|
CMSTriggerRatio |
`` |
`` |
|
CMSTriggerPermRatio |
`` |
`` |
|
CMSBootstrapOccupancy |
`` |
`` |
|
CMSInitiatingOccupancyFraction |
`` |
`` |
|
InitiatingHeapOccupancyPercent |
`` |
`` |
|
CMSInitiatingPermOccupancyFraction |
`` |
`` |
|
UseCMSInitiatingOccupancyOnly |
`` |
`` |
|
CMSIsTooFullPercentage |
`` |
`` |
|
PrintPromotionFailure |
`` |
`` |
|
PreserveMarkStackSize |
`` |
`` |
|
UseTLAB |
bool |
product_pd |
Thread-Local Allocation Buffers(TLAB)线程本地分配缓存,是一种在多线程程序中的技术,每个线程拥有一小块Eden中的内存区域,在内存分配时避免锁,加速内存分配速度。 [28][29] |
ResizeTLAB |
bool |
product_pd |
为线程动态改变TLAB的大小 [29] |
ZeroTLAB |
`` |
`` |
|
FastTLABRefill |
`` |
`` |
|
PrintTLAB |
bool |
product |
打印和TLAB各种相关的信息到控制台,通过参数-XX:+PrintTLAB -XX:+Verbose可打印每个线程动态改变TLAB的大小,大小变化都在Scavenge GC注3时 [29] |
TLABStats |
bool |
product |
记录TLAB相关信息 |
PrintRevisitStats |
`` |
`` |
|
NeverActAsServerClassMachine |
`` |
`` |
|
AlwaysActAsServerClassMachine |
`` |
`` |
|
MaxRAM |
`` |
`` |
|
ErgoHeapSizeLimit |
`` |
`` |
|
MaxRAMFraction |
`` |
`` |
|
DefaultMaxRAMFraction |
`` |
`` |
|
MinRAMFraction |
`` |
`` |
|
InitialRAMFraction |
`` |
`` |
|
UseAutoGCSelectPolicy |
`` |
`` |
|
AutoGCSelectPauseMillis |
`` |
`` |
|
UseAdaptiveSizePolicy |
bool |
product |
-XX:+UseAdaptiveSizePolicy 建议使用-XX:-UseAdaptiveSizePolicy关掉,为什么当你的参数设置了NewRatio、Survivor、MaxTenuringThreshold这几个参数如果在启动了动态更新情况下,是无效的,当然如果你设置-Xmn是有效的,但是如果设置的比例的话,初始化可能会按照你的参数去运行,不过运行过程中会通过一定的算法动态修改,监控中你可能会发现这些参数会发生改变,甚至于S0和S1的大小不一样,如果启动了这个参数,又想要跟踪变化,那么就使用参数:-XX:+PrintAdaptiveSizePolicy [32] |
UsePSAdaptiveSurvivorSizePolicy |
`` |
`` |
|
UseAdaptiveGenerationSizePolicyAtMinorCollection |
`` |
`` |
|
UseAdaptiveGenerationSizePolicyAtMajorCollection |
`` |
`` |
|
UseAdaptiveSizePolicyWithSystemGC |
`` |
`` |
|
UseAdaptiveGCBoundary |
`` |
`` |
|
AdaptiveSizeThroughPutPolicy |
`` |
`` |
|
AdaptiveSizePausePolicy |
`` |
`` |
|
AdaptiveSizePolicyInitializingSteps |
`` |
`` |
|
AdaptiveSizePolicyOutputInterval |
`` |
`` |
|
UseAdaptiveSizePolicyFootprintGoal |
`` |
`` |
|
AdaptiveSizePolicyWeight |
`` |
`` |
|
AdaptiveTimeWeight |
`` |
`` |
|
PausePadding |
`` |
`` |
|
PromotedPadding |
`` |
`` |
|
SurvivorPadding |
`` |
`` |
|
AdaptivePermSizeWeight |
`` |
`` |
|
PermGenPadding |
`` |
`` |
|
ThresholdTolerance |
`` |
`` |
|
AdaptiveSizePolicyCollectionCostMargin |
`` |
`` |
|
YoungGenerationSizeIncrement |
`` |
`` |
|
YoungGenerationSizeSupplement |
`` |
`` |
|
YoungGenerationSizeSupplementDecay |
`` |
`` |
|
TenuredGenerationSizeIncrement |
`` |
`` |
|
TenuredGenerationSizeSupplement |
`` |
`` |
|
TenuredGenerationSizeSupplementDecay |
`` |
`` |
|
MaxGCPauseMillis |
`` |
`` |
|
GCPauseIntervalMillis |
`` |
`` |
|
MaxGCMinorPauseMillis |
`` |
`` |
|
GCTimeRatio |
`` |
`` |
|
AdaptiveSizeDecrementScaleFactor |
`` |
`` |
|
UseAdaptiveSizeDecayMajorGCCost |
`` |
`` |
|
AdaptiveSizeMajorGCDecayTimeScale |
`` |
`` |
|
MinSurvivorRatio |
`` |
`` |
|
InitialSurvivorRatio |
`` |
`` |
|
BaseFootPrintEstimate |
`` |
`` |
|
UseGCOverheadLimit |
`` |
`` |
|
GCTimeLimit |
`` |
`` |
|
GCHeapFreeLimit |
`` |
`` |
|
PrintAdaptiveSizePolicy |
`` |
`` |
|
PrefetchCopyIntervalInBytes |
`` |
`` |
|
PrefetchScanIntervalInBytes |
`` |
`` |
|
PrefetchFieldsAhead |
`` |
`` |
|
DisableExplicitGC |
bool |
product |
禁止在运行期显式地调用System.gc()。 开启该选项后,GC的触发时机将由Garbage Collector全权掌控。 注意:你熟悉的代码里没调用System.gc(),不代表你依赖的框架工具没在使用。 例如RMI就在多数用户毫不知情的情况下,显示地调用GC来防止自身OOM。[19] |
PreZeroEden |
`` |
`` |
|
CollectGen0First |
bool |
product |
FullGC时是否先YGC [33] |
BindGCTaskThreadsToCPUs |
`` |
`` |
|
UseGCTaskAffinity |
`` |
`` |
|
ProcessDistributionStride |
`` |
`` |
|
CMSCoordinatorYieldSleepCount |
`` |
`` |
|
CMSYieldSleepCount |
`` |
`` |
|
PrintGC |
`` |
`` |
|
PrintGCDetails |
`` |
`` |
|
PrintGCDateStamps |
`` |
`` |
|
PrintGCTimeStamps |
`` |
`` |
|
PrintGCTaskTimeStamps |
`` |
`` |
|
PrintReferenceGC |
`` |
`` |
|
TraceClassLoading |
`` |
`` |
|
TraceClassLoadingPreorder |
`` |
`` |
|
TraceClassUnloading |
`` |
`` |
|
TraceLoaderConstraints |
`` |
`` |
|
TraceGen0Time |
`` |
`` |
|
TraceGen1Time |
`` |
`` |
|
PrintTenuringDistribution |
bool |
product |
打印对象晋升相关的信息 |
PrintHeapAtGC |
bool |
product_rw |
在GC前后打印Heap分带信息 |
PrintHeapAtGCExtended |
bool |
product_rw |
当在G1回收算法GC时打印扩展信息 |
PrintHeapAtSIGBREAK |
`` |
`` |
|
PrintClassHistogramBeforeFullGC |
`` |
`` |
|
PrintClassHistogramAfterFullGC |
`` |
`` |
|
PrintClassHistogram |
`` |
`` |
|
TraceParallelOldGCTasks |
`` |
`` |
|
PrintParallelOldGCPhaseTimes |
`` |
`` |
|
PrintJNIGCStalls |
`` |
`` |
|
CITime |
`` |
`` |
|
CICompilerCount |
`` |
`` |
|
CompilationPolicyChoice |
`` |
`` |
|
PrintSafepointStatistics |
`` |
`` |
|
PrintSafepointStatisticsCount |
`` |
`` |
|
PrintSafepointStatisticsTimeout |
`` |
`` |
|
TraceSafepointCleanupTime |
`` |
`` |
|
Inline |
`` |
`` |
|
ClipInlining |
`` |
`` |
|
UseTypeProfile |
`` |
`` |
|
TypeProfileMajorReceiverPercent |
`` |
`` |
|
UseCountLeadingZerosInstruction |
`` |
`` |
|
UsePopCountInstruction |
`` |
`` |
|
PrintVMOptions |
bool |
product |
打印命令行设置的参数(未做转换) |
IgnoreUnrecognizedVMOptions |
bool |
product |
忽略JVM不认识的参数设置 |
PrintCommandLineFlags |
bool |
product |
打印启动参数中设置的JVM参数 |
PrintFlagsInitial |
bool |
product |
打印JVM参数初始值并退出 |
PrintFlagsFinal |
bool |
product |
打印最终的JVM参数 |
ErrorFile |
`` |
`` |
|
DisplayVMOutputToStderr |
`` |
`` |
|
DisplayVMOutputToStdout |
`` |
`` |
|
UseHeavyMonitors |
`` |
`` |
|
RangeCheckElimination |
`` |
`` |
|
SplitIfBlocks |
`` |
`` |
|
AggressiveOpts |
bool |
product |
加快编译 |
UseStringCache |
`` |
`` |
|
UseCompressedStrings |
`` |
`` |
|
SpecialStringCompress |
`` |
`` |
|
SpecialStringInflate |
`` |
`` |
|
SpecialStringCompareToCC |
`` |
`` |
|
SpecialStringIndexOfCC |
`` |
`` |
|
SpecialStringEqualsCC |
`` |
`` |
|
RewriteBytecodes |
`` |
`` |
|
RewriteFrequentPairs |
`` |
`` |
|
UseInterpreter |
`` |
`` |
|
UseNiagaraInstrs |
`` |
`` |
|
UseLoopCounter |
`` |
`` |
|
UseFastEmptyMethods |
`` |
`` |
|
UseFastAccessorMethods |
bool |
product |
原始类型的快速优化 |
UseOnStackReplacement |
`` |
`` |
|
PreferInterpreterNativeStubs |
`` |
`` |
|
ProfileInterpreter |
`` |
`` |
|
ProfileMaturityPercentage |
`` |
`` |
|
UseCompiler |
`` |
`` |
|
UseCounterDecay |
`` |
`` |
|
AlwaysCompileLoopMethods |
`` |
`` |
|
DontCompileHugeMethods |
bool |
product |
不编译大方法(即字节数大于HugeMethodLimit的方法,默认8000,develop类型参数) |
EstimateArgEscape |
`` |
`` |
|
BCEATraceLevel |
`` |
`` |
|
MaxBCEAEstimateLevel |
`` |
`` |
|
MaxBCEAEstimateSize |
`` |
`` |
|
AllocatePrefetchStyle |
`` |
`` |
|
AllocatePrefetchDistance |
`` |
`` |
|
AllocatePrefetchLines |
`` |
`` |
|
AllocatePrefetchStepSize |
`` |
`` |
|
AllocatePrefetchInstr |
`` |
`` |
|
ReadPrefetchInstr |
`` |
`` |
|
PrintJavaStackAtFatalState |
`` |
`` |
|
SelfDestructTimer |
`` |
`` |
|
MaxJavaStackTraceDepth |
intx |
product |
异常抛出时打印栈的最大深度 |
SafepointTimeoutDelay |
`` |
`` |
|
NmethodSweepFraction |
`` |
`` |
|
NmethodSweepCheckInterval |
`` |
`` |
|
MaxInlineLevel |
`` |
`` |
|
MaxRecursiveInlineLevel |
`` |
`` |
|
InlineSmallCode |
`` |
`` |
|
MaxInlineSize |
intx |
product |
限制动态编译的内联函数的虚拟机指令的最大数量 [35] |
FreqInlineSize |
intx |
product_pd |
限制经常使用的动态编译的函数的虚拟机指令的最大数量 [35] |
MaxTrivialSize |
`` |
`` |
|
MinInliningThreshold |
`` |
`` |
|
ProfileIntervalsTicks |
`` |
`` |
|
EventLogLength |
`` |
`` |
|
TypeProfileWidth |
`` |
`` |
|
PerMethodRecompilationCutoff |
`` |
`` |
|
PerBytecodeRecompilationCutoff |
`` |
`` |
|
PerMethodTrapLimit |
`` |
`` |
|
PerBytecodeTrapLimit |
`` |
`` |
|
AliasLevel |
`` |
`` |
|
ReadSpinIterations |
`` |
`` |
|
PreInflateSpin |
`` |
`` |
|
PreBlockSpin |
`` |
`` |
|
InitialHeapSize |
uintx |
product |
为Heap区域的初始值 [32] |
MaxHeapSize |
uintx |
product |
为Heap区域的最大值 [32] |
OldSize |
`` |
`` |
|
NewSize |
uintx |
product |
设置年轻代大小 |
MaxNewSize |
uintx |
product |
年轻代最大值 |
PretenureSizeThreshold |
uintx |
product |
对象超过多大是直接在旧生代分配,单位字节 新生代采用Parallel Scavenge GC时无效,另一种直接在旧生代分配的情况是大的数组对象,且数组中无外部引用对象 [33] |
TLABSize |
`` |
`` |
|
MinTLABSize |
`` |
`` |
|
TLABAllocationWeight |
`` |
`` |
|
TLABWasteTargetPercent |
uintx |
product |
TLAB占eden区的百分比 |
TLABRefillWasteFraction |
`` |
`` |
|
TLABWasteIncrement |
`` |
`` |
|
SurvivorRatio |
intx |
product |
该参数为Eden与两个求助空间之一的比例,注意Yong的大小等价于Eden + S0 + S1,S0和S1的大小是等价的,这个参数为Eden与其中一个S区域的大小比例,如参数为8,那么Eden就占用Yong的80%,而S0和S1分别占用10% [32] |
NewRatio |
intx |
product |
为Old区域为Yong的多少倍,间接设置Yong的大小,1.6中如果使用此参数,则默认会在适当时候被动态调整,具体请看下面参数UseAdaptiveSizePolicy 的说明 [32] |
NewSizeThreadIncrease |
`` |
`` |
|
PermSize |
uintx |
product_pd |
设置持久代(perm gen)初始值 |
MaxPermSize |
uintx |
product_pd |
设置持久代最大值 |
MinHeapFreeRatio |
`` |
`` |
|
MaxHeapFreeRatio |
`` |
`` |
|
SoftRefLRUPolicyMSPerMB |
`` |
`` |
|
MinHeapDeltaBytes |
`` |
`` |
|
MinPermHeapExpansion |
`` |
`` |
|
MaxPermHeapExpansion |
`` |
`` |
|
QueuedAllocationWarningCount |
`` |
`` |
|
MaxTenuringThreshold |
intx |
product |
在正常情况下,新申请的对象在Yong区域发生多少次GC后就会被移动到Old(非正常就是S0或S1放不下或者不太可能出现的Eden都放不下的对象),这个参数一般不会超过16(因为计数器从0开始计数,所以设置为15的时候相当于生命周期为16),要查看现在的这个值的具体情况,可以使用参数:-XX:+PrintTenuringDistribution [32] |
InitialTenuringThreshold |
`` |
`` |
|
TargetSurvivorRatio |
`` |
`` |
|
MarkSweepDeadRatio |
`` |
`` |
|
PermMarkSweepDeadRatio |
`` |
`` |
|
MarkSweepAlwaysCompactCount |
`` |
`` |
|
PrintCMSStatistics |
`` |
`` |
|
PrintCMSInitiationStatistics |
`` |
`` |
|
PrintFLSStatistics |
intx |
product |
取值: 0, 1, 2 用于打印CMS GC时的空闲空间列表 |
PrintFLSCensus |
`` |
`` |
|
DeferThrSuspendLoopCount |
`` |
`` |
|
DeferPollingPageLoopCount |
`` |
`` |
|
SafepointSpinBeforeYield |
`` |
`` |
|
PSChunkLargeArrays |
`` |
`` |
|
GCDrainStackTargetSize |
`` |
`` |
|
StackYellowPages |
`` |
`` |
|
StackRedPages |
`` |
`` |
|
StackShadowPages |
`` |
`` |
|
ThreadStackSize |
intx |
product_pd |
线程的栈大小,如在OpenJDK中使用函数“JavaThread::set_stack_size_at_create”(Linux)来设置该参数 |
VMThreadStackSize |
intx |
product_pd |
VMThread, PGCThread, CGCTHhread, WatcherThread线程的栈大小 |
CompilerThreadStackSize |
intx |
product_pd |
编译线程的栈大小,如果未设置则使用VMThreadStackSize的大小 |
ThreadSafetyMargin |
`` |
`` |
|
OptoLoopAlignment |
`` |
`` |
|
InitialCodeCacheSize |
`` |
`` |
|
ReservedCodeCacheSize |
`` |
`` |
|
CodeCacheMinimumFreeSpace |
`` |
`` |
|
CodeCacheExpansionSize |
`` |
`` |
|
UseCodeCacheFlushing |
`` |
`` |
|
MinCodeCacheFlushingInterval |
`` |
`` |
|
CodeCacheFlushingMinimumFreeSpace |
`` |
`` |
|
CompileOnly |
`` |
`` |
|
CompileCommandFile |
`` |
`` |
|
CompileCommand |
`` |
`` |
|
CICompilerCountPerCPU |
`` |
`` |
|
UseThreadPriorities |
bool |
product_pd |
设置是否使用本地线程优先级 [35] |
ThreadPriorityPolicy |
`` |
`` |
|
ThreadPriorityVerbose |
`` |
`` |
|
DefaultThreadPriority |
`` |
`` |
|
CompilerThreadPriority |
`` |
`` |
|
VMThreadPriority |
`` |
`` |
|
CompilerThreadHintNoPreempt |
`` |
`` |
|
VMThreadHintNoPreempt |
`` |
`` |
|
JavaPriority1_To_OSPriority |
`` |
`` |
|
JavaPriority2_To_OSPriority |
`` |
`` |
|
JavaPriority3_To_OSPriority |
`` |
`` |
|
JavaPriority4_To_OSPriority |
`` |
`` |
|
JavaPriority5_To_OSPriority |
`` |
`` |
|
JavaPriority6_To_OSPriority |
`` |
`` |
|
JavaPriority7_To_OSPriority |
`` |
`` |
|
JavaPriority8_To_OSPriority |
`` |
`` |
|
JavaPriority9_To_OSPriority |
`` |
`` |
|
JavaPriority10_To_OSPriority |
`` |
`` |
|
StarvationMonitorInterval |
`` |
`` |
|
CompileThreshold |
intx |
product_pd |
触发JIT的阈值,函数被解释执行的次数 |
BackEdgeThreshold |
`` |
`` |
|
Tier0InvokeNotifyFreqLog |
`` |
`` |
|
Tier2InvokeNotifyFreqLog |
`` |
`` |
|
Tier3InvokeNotifyFreqLog |
`` |
`` |
|
Tier0BackedgeNotifyFreqLog |
`` |
`` |
|
Tier2BackedgeNotifyFreqLog |
`` |
`` |
|
Tier3BackedgeNotifyFreqLog |
`` |
`` |
|
Tier2CompileThreshold |
`` |
`` |
|
Tier2BackEdgeThreshold |
`` |
`` |
|
Tier3InvocationThreshold |
`` |
`` |
|
Tier3MinInvocationThreshold |
`` |
`` |
|
Tier3CompileThreshold |
`` |
`` |
|
Tier3BackEdgeThreshold |
`` |
`` |
|
Tier4InvocationThreshold |
`` |
`` |
|
Tier4MinInvocationThreshold |
`` |
`` |
|
Tier4CompileThreshold |
`` |
`` |
|
Tier4BackEdgeThreshold |
`` |
`` |
|
Tier3DelayOn |
`` |
`` |
|
Tier3DelayOff |
`` |
`` |
|
Tier3LoadFeedback |
`` |
`` |
|
Tier4LoadFeedback |
`` |
`` |
|
TieredCompileTaskTimeout |
`` |
`` |
|
TieredStopAtLevel |
`` |
`` |
|
Tier0ProfilingStartPercentage |
`` |
`` |
|
TieredRateUpdateMinTime |
`` |
`` |
|
TieredRateUpdateMaxTime |
`` |
`` |
|
TieredCompilation |
`` |
`` |
|
PrintTieredEvents |
`` |
`` |
|
StressTieredRuntime |
`` |
`` |
|
OnStackReplacePercentage |
`` |
`` |
|
InterpreterProfilePercentage |
`` |
`` |
|
DesiredMethodLimit |
`` |
`` |
|
ReflectionWrapResolutionErrors |
`` |
`` |
|
MaxDirectMemorySize |
`` |
`` |
|
UsePerfData |
`` |
`` |
|
PerfDataSaveToFile |
`` |
`` |
|
PerfDataSaveFile |
`` |
`` |
|
PerfDataSamplingInterval |
`` |
`` |
|
PerfDisableSharedMem |
`` |
`` |
|
PerfDataMemorySize |
`` |
`` |
|
PerfMaxStringConstLength |
`` |
`` |
|
PerfAllowAtExitRegistration |
`` |
`` |
|
PerfBypassFileSystemCheck |
`` |
`` |
|
UnguardOnExecutionViolation |
`` |
`` |
|
ManagementServer |
`` |
`` |
|
DisableAttachMechanism |
bool |
product |
禁止JVM被Attach |
StartAttachListener |
`` |
`` |
|
PrintConcurrentLocks |
`` |
`` |
|
UseSharedSpaces |
`` |
`` |
|
RequireSharedSpaces |
`` |
`` |
|
DumpSharedSpaces |
`` |
`` |
|
PrintSharedSpaces |
`` |
`` |
|
SharedDummyBlockSize |
`` |
`` |
|
SharedReadWriteSize |
`` |
`` |
|
SharedReadOnlySize |
`` |
`` |
|
SharedMiscDataSize |
`` |
`` |
|
SharedMiscCodeSize |
`` |
`` |
|
AnonymousClasses |
`` |
`` |
|
ExtendedDTraceProbes |
`` |
`` |
|
DTraceMethodProbes |
`` |
`` |
|
DTraceAllocProbes |
`` |
`` |
|
DTraceMonitorProbes |
`` |
`` |
|
RelaxAccessControlCheck |
`` |
`` |
|
WaitForDebugger |
`` |
`` |
|
UseFileLocking |
`` |
`` |
|
UncommitYoungGenOnGC |
`` |
`` |
|
UncommitOldGenOnGC |
`` |
`` |
|
TraceUncommitMemory |
`` |
`` |
|
UncommitUsesMadvise |
`` |
`` |
|
UseVMInterruptibleIO |
`` |
`` |
|
G1ConfidencePercent |
`` |
`` |
|
G1MarkRegionStackSize |
`` |
`` |
|
G1SATBBufferSize |
`` |
`` |
|
G1SATBBufferEnqueueingThresholdPercent |
`` |
`` |
|
G1UpdateBufferSize |
`` |
`` |
|
G1ConcRefinementYellowZone |
`` |
`` |
|
G1ConcRefinementRedZone |
`` |
`` |
|
G1ConcRefinementGreenZone |
`` |
`` |
|
G1ConcRefinementServiceIntervalMillis |
`` |
`` |
|
G1ConcRefinementThresholdStep |
`` |
`` |
|
G1RSetUpdatingPauseTimePercent |
`` |
`` |
|
G1UseAdaptiveConcRefinement |
`` |
`` |
|
G1RSetRegionEntries |
`` |
`` |
|
G1RSetSparseRegionEntries |
`` |
`` |
|
G1ReservePercent |
`` |
`` |
|
G1HeapRegionSize |
`` |
`` |
|
G1ConcRefinementThreads |
`` |
`` |
|
G1RSetScanBlockSize |
`` |
`` |
|
CacheGlobally |
`` |
`` |
|
CacheCount |
`` |
`` |
|
ValueMapInitialSize |
`` |
`` |
|
ValueMapMaxLoopSize |
`` |
`` |
|
LIRFillDelaySlots |
`` |
`` |
|
TimeLinearScan |
`` |
`` |
|
CompilationRepeat |
`` |
`` |
|
LIRSchedule |
`` |
`` |
|
SafepointPollOffset |
`` |
`` |
|
C1ProfileCalls |
`` |
`` |
|
C1ProfileVirtualCalls |
`` |
`` |
|
C1ProfileInlinedCalls |
`` |
`` |
|
C1ProfileBranches |
`` |
`` |
|
C1ProfileCheckcasts |
`` |
`` |
|
C1OptimizeVirtualCallProfiling |
`` |
`` |
|
C1UpdateMethodData |
`` |
`` |
|
InteriorEntryAlignment |
`` |
`` |
|
MaxLoopPad |
`` |
`` |
|
NumberOfLoopInstrToAlign |
`` |
`` |
|
LoopUnrollLimit |
`` |
`` |
|
LoopUnrollMin |
`` |
`` |
|
MultiArrayExpandLimit |
`` |
`` |
|
UseLoopPredicate |
`` |
`` |
|
OptimizeFill |
`` |
`` |
|
TrackedInitializationLimit |
`` |
`` |
|
ReduceFieldZeroing |
`` |
`` |
|
ReduceInitialCardMarks |
`` |
`` |
|
ReduceBulkZeroing |
`` |
`` |
|
UseFPUForSpilling |
`` |
`` |
|
OptoScheduling |
`` |
`` |
|
PartialPeelLoop |
`` |
`` |
|
PartialPeelNewPhiDelta |
`` |
`` |
|
PartialPeelAtUnsignedTests |
`` |
`` |
|
ReassociateInvariants |
`` |
`` |
|
LoopUnswitching |
`` |
`` |
|
UseSuperWord |
`` |
`` |
|
TraceSuperWord |
`` |
`` |
|
OptoBundling |
`` |
`` |
|
ConditionalMoveLimit |
`` |
`` |
|
BranchOnRegister |
`` |
`` |
|
UseRDPCForConstantTableBase |
`` |
`` |
|
UseOldInlining |
`` |
`` |
|
UseBimorphicInlining |
`` |
`` |
|
UseOnlyInlinedBimorphic |
`` |
`` |
|
InsertMemBarAfterArraycopy |
`` |
`` |
|
Tier1Inline |
`` |
`` |
|
Tier1MaxInlineSize |
`` |
`` |
|
Tier1FreqInlineSize |
`` |
`` |
|
Tier1LoopOptsCount |
`` |
`` |
|
LoopOptsCount |
`` |
`` |
|
MaxNodeLimit |
`` |
`` |
|
NodeLimitFudgeFactor |
`` |
`` |
|
UseJumpTables |
`` |
`` |
|
UseDivMod |
`` |
`` |
|
MinJumpTableSize |
`` |
`` |
|
MaxJumpTableSize |
`` |
`` |
|
MaxJumpTableSparseness |
`` |
`` |
|
EliminateLocks |
`` |
`` |
|
PrintPreciseBiasedLockingStatistics |
`` |
`` |
|
EliminateAutoBox |
`` |
`` |
|
AutoBoxCacheMax |
`` |
`` |
|
DoEscapeAnalysis |
bool |
product |
逃逸分析,在C2中定义,在编程语言的编译优化原理中,分析指针动态范围的方法称之为逃逸分析。通俗一点讲,就是当一个对象的指针被多个方法或线程引用时,我们称这个指针发生了逃逸。而用来分析这种逃逸现象的方法,就称之为逃逸分析。 [15][16][17] |
EliminateAllocations |
`` |
`` |
|
EliminateAllocationArraySizeLimit |
`` |
`` |
|
UseOptoBiasInlining |
`` |
`` |
|
OptimizeStringConcat |
`` |
`` |
|
ValueSearchLimit |
`` |
`` |
|
MaxLabelRootDepth |
`` |
`` |
|
DominatorSearchLimit |
`` |
`` |
|
BlockLayoutByFrequency |
`` |
`` |
|
BlockLayoutMinDiamondPercentage |
`` |
`` |
|
BlockLayoutRotateLoops |
`` |
`` |
|