Thursday, August 20, 2015

Comparing JVM options when tuning for performance

Sometimes, when tuning the JVM performance by trying different command line options, it is useful to see what flags are actually effective.

We could specify the option "-XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal" to do just that.

The followings are the diff (diff -U 0) between -server and -client options, running on Java 1.8.0_60 on ARM hf.

$java -server -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal > server

$java -client -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal > client

$ diff -U 0 client server
--- client      2015-08-20 18:25:36.208946610 -0700
+++ server      2015-08-20 18:25:24.664324031 -0700
@@ -12,0 +13,2 @@
+     intx AliasLevel                                = 3                                   {C2 product}
+     bool AlignVector                               = true                                {C2 product}
@@ -30,0 +33 @@
+     intx AutoBoxCacheMax                           = 128                                 {C2 product}
@@ -33 +36 @@
-     intx BackEdgeThreshold                         = 100000                              {pd product}
+     intx BackEdgeThreshold                         = 140000                              {pd product}
@@ -41,0 +45,3 @@
+     bool BlockLayoutByFrequency                    = true                                {C2 product}
+     intx BlockLayoutMinDiamondPercentage           = 20                                  {C2 product}
+     bool BlockLayoutRotateLoops                    = true                                {C2 product}
@@ -42,0 +49 @@
+     bool BranchOnRegister                          = false                               {C2 product}
@@ -45,9 +52 @@
-     bool C1OptimizeVirtualCallProfiling            = true                                {C1 product}
-     bool C1PatchInvokeDynamic                      = true                                {C1 diagnostic}
-     bool C1ProfileBranches                         = true                                {C1 product}
-     bool C1ProfileCalls                            = true                                {C1 product}
-     bool C1ProfileCheckcasts                       = true                                {C1 product}
-     bool C1ProfileInlinedCalls                     = true                                {C1 product}
-     bool C1ProfileVirtualCalls                     = true                                {C1 product}
-     bool C1UpdateMethodData                        = false                               {C1 product}
-     intx CICompilerCount                           = 1                                   {product}
+     intx CICompilerCount                           = 2                                   {product}
@@ -148 +147 @@
-     intx CompileThreshold                          = 1500                                {pd product}
+     intx CompileThreshold                          = 10000                               {pd product}
@@ -153,0 +153 @@
+     intx ConditionalMoveLimit                      = 4                                   {C2 pd product}
@@ -161,0 +162 @@
+     bool DebugInlinedCalls                         = true                                {C2 diagnostic}
@@ -171,0 +173 @@
+ccstrlist DisableIntrinsic                          =                                     {C2 diagnostic}
@@ -174,0 +177,2 @@
+     bool DoEscapeAnalysis                          = true                                {C2 product}
+     intx DominatorSearchLimit                      = 1000                                {C2 diagnostic}
@@ -180,0 +185,5 @@
+     intx EliminateAllocationArraySizeLimit         = 64                                  {C2 product}
+     bool EliminateAllocations                      = true                                {C2 product}
+     bool EliminateAutoBox                          = true                                {C2 product}
+     bool EliminateLocks                            = true                                {C2 product}
+     bool EliminateNestedLocks                      = true                                {C2 product}
@@ -188,0 +198 @@
+   double EscapeAnalysisTimeout                     = 20.000000                           {C2 product}
@@ -210 +220 @@
-     intx FreqInlineSize                            = 325                                 {pd product}
+     intx FreqInlineSize                            = 175                                 {pd product}
@@ -265,0 +276 @@
+     bool IncrementalInline                         = true                                {C2 product}
@@ -267 +278 @@
-    uintx InitialCodeCacheSize                      = 163840                              {pd product}
+    uintx InitialCodeCacheSize                      = 1572864                             {pd product}
@@ -276 +287,2 @@
-     bool InlineSynchronizedMethods                 = true                                {C1 product}
+     bool InsertMemBarAfterArraycopy                = true                                {C2 product}
+     intx InteriorEntryAlignment                    = 16                                  {C2 pd product}
@@ -290 +301,0 @@
-     bool LIRFillDelaySlots                         = false                               {C1 pd product}
@@ -293,0 +305 @@
+     intx LiveNodeCountInliningCutoff               = 40000                               {C2 product}
@@ -300,0 +313,6 @@
+     bool LoopLimitCheck                            = true                                {C2 diagnostic}
+     intx LoopMaxUnroll                             = 16                                  {C2 product}
+     intx LoopOptsCount                             = 43                                  {C2 product}
+     intx LoopUnrollLimit                           = 60                                  {C2 pd product}
+     intx LoopUnrollMin                             = 4                                   {C2 product}
+     bool LoopUnswitching                           = true                                {C2 product}
@@ -320,0 +339,4 @@
+     intx MaxJumpTableSize                          = 65000                               {C2 product}
+     intx MaxJumpTableSparseness                    = 5                                   {C2 product}
+     intx MaxLabelRootDepth                         = 1100                                {C2 product}
+     intx MaxLoopPad                                = 15                                  {C2 product}
@@ -325 +347,2 @@
- uint64_t MaxRAM                                    = 1073741824                          {pd product}
+     intx MaxNodeLimit                              = 75000                               {C2 product}
+ uint64_t MaxRAM                                    = 0                                   {pd product}
@@ -330 +353,2 @@
-    uintx MetaspaceSize                             = 12582912                            {pd product}
+     intx MaxVectorSize                             = 8                                   {C2 product}
+    uintx MetaspaceSize                             = 16777216                            {pd product}
@@ -334,0 +359 @@
+     intx MinJumpTableSize                          = 16                                  {C2 pd product}
@@ -341,0 +367 @@
+     intx MultiArrayExpandLimit                     = 6                                   {C2 product}
@@ -350 +376 @@
-     bool NeverActAsServerClassMachine              = true                                {pd product}
+     bool NeverActAsServerClassMachine              = false                               {pd product}
@@ -357,0 +384 @@
+     intx NodeLimitFudgeFactor                      = 2000                                {C2 product}
@@ -358,0 +386 @@
+     intx NumberOfLoopInstrToAlign                  = 4                                   {C2 product}
@@ -365 +393,6 @@
-     intx OnStackReplacePercentage                  = 933                                 {pd product}
+     intx OnStackReplacePercentage                  = 140                                 {pd product}
+     bool OptimizeExpensiveOps                      = true                                {C2 diagnostic}
+     bool OptimizeFill                              = true                                {C2 product}
+     bool OptimizePtrCompare                        = true                                {C2 product}
+     bool OptimizeStringConcat                      = true                                {C2 product}
+     bool OptoBundling                              = false                               {C2 pd product}
@@ -366,0 +400 @@
+     bool OptoScheduling                            = true                                {C2 pd product}
@@ -382,0 +417,3 @@
+     bool PartialPeelAtUnsignedTests                = true                                {C2 product}
+     bool PartialPeelLoop                           = true                                {C2 product}
+     intx PartialPeelNewPhiDelta                    = 0                                   {C2 product}
@@ -442,0 +480 @@
+     bool PrintIntrinsics                           = false                               {C2 diagnostic}
@@ -453,0 +492,2 @@
+     bool PrintPreciseBiasedLockingStatistics       = false                               {C2 diagnostic}
+     bool PrintPreciseRTMLockingStatistics          = false                               {C2 diagnostic}
@@ -473 +513,2 @@
-     bool ProfileInterpreter                        = false                               {pd product}
+     bool ProfileDynamicTypes                       = true                                {C2 diagnostic}
+     bool ProfileInterpreter                        = true                                {pd product}
@@ -482,0 +524,5 @@
+     bool RangeLimitCheck                           = true                                {C2 diagnostic}
+     bool ReassociateInvariants                     = true                                {C2 product}
+     bool ReduceBulkZeroing                         = true                                {C2 product}
+     bool ReduceFieldZeroing                        = true                                {C2 product}
+     bool ReduceInitialCardMarks                    = true                                {C2 product}
@@ -496,3 +542,2 @@
-     bool RewriteBytecodes                          = false                               {pd product}
-     bool RewriteFrequentPairs                      = false                               {pd product}
-     intx SafepointPollOffset                       = 0                                   {C1 pd product}
+     bool RewriteBytecodes                          = true                                {pd product}
+     bool RewriteFrequentPairs                      = true                                {pd product}
@@ -515,0 +561,2 @@
+     bool SpecialEncodeISOArray                     = true                                {C2 product}
+     bool SplitIfBlocks                             = true                                {C2 product}
@@ -578 +624,0 @@
-     bool TimeLinearScan                            = false                               {C1 product}
@@ -599,0 +646,2 @@
+     bool TraceTypeProfile                          = false                               {C2 diagnostic}
+     intx TrackedInitializationLimit                = 50                                  {C2 product}
@@ -601,0 +650 @@
+     bool TrapBasedRangeChecks                      = false                               {C2 pd product}
@@ -603,0 +653 @@
+     intx TypeProfileMajorReceiverPercent           = 90                                  {C2 product}
@@ -608,0 +659 @@
+     bool UnrollLimitCheck                          = true                                {C2 diagnostic}
@@ -622,0 +674 @@
+     bool UseBimorphicInlining                      = true                                {C2 product}
@@ -632,0 +685 @@
+     bool UseCondCardMark                           = false                               {C2 product}
@@ -633,0 +687 @@
+     bool UseDivMod                                 = true                                {C2 product}
@@ -634,0 +689 @@
+     bool UseFPUForSpilling                         = true                                {C2 product}
@@ -643,0 +699 @@
+     bool UseImplicitStableValues                   = true                                {C2 diagnostic}
@@ -644,0 +701 @@
+     bool UseInlineDepthForSpeculativeTypes         = true                                {C2 diagnostic}
@@ -645,0 +703 @@
+     bool UseJumpTables                             = true                                {C2 product}
@@ -653 +711,2 @@
-     bool UseLoopInvariantCodeMotion                = true                                {C1 product}
+     bool UseLoopPredicate                          = true                                {C2 product}
+     bool UseMathExactIntrinsics                    = true                                {C2 product}
@@ -655,0 +715 @@
+     bool UseMultiplyToLenIntrinsic                 = false                               {C2 product}
@@ -661,0 +722 @@
+     bool UseOldInlining                            = true                                {C2 product}
@@ -662,0 +724 @@
+     bool UseOnlyInlinedBimorphic                   = true                                {C2 product}
@@ -663,0 +726 @@
+     bool UseOptoBiasInlining                       = false                               {C2 product}
@@ -669 +732,2 @@
-     bool UsePopCountInstruction                    = false                               {product}
+     bool UsePopCountInstruction                    = true                                {product}
+     bool UseRDPCForConstantTableBase               = false                               {C2 product}
@@ -680,0 +745 @@
+     bool UseSuperWord                              = true                                {C2 product}
@@ -684,0 +750 @@
+     bool UseTypeSpeculation                        = true                                {C2 product}
@@ -690,2 +756 @@
-     intx ValueMapInitialSize                       = 11                                  {C1 product}
-     intx ValueMapMaxLoopSize                       = 8                                   {C1 product}
+     intx ValueSearchLimit                          = 1000                                {C2 product}

No comments: