开发者

What flags are enabled by -XX:+AggressiveOpts on Sun JRE 1.6u20?

开发者 https://www.devze.com 2023-01-01 18:53 出处:网络
From Sun JRE performance tuning whitepaper, -XX:+AggressiveOpts flag is described as: Turns on point performance

From Sun JRE performance tuning whitepaper, -XX:+AggressiveOpts flag is described as:

Turns on point performance optimizations that are expected to be on by default in upcoming releases. The changes grouped by this flag are minor changes to JVM runtime compiled code and not distinct performance features (such as BiasedLocking and ParallelOldGC). This is a good flag to try the JVM engineering team's latest performance tweaks for upcoming releases. Note: this option is experimental! The specific optimizations enabled by this option can change from release to release and even build to build. You should reevaluate the effects of this option with prior to deploying a new release of Java.

My performance tests indicate that using -XX:+AggressiveOpts actually helps my application, but since this is marked as experimental I want to be careful with it (I have been burned by it in the past). So, I want to know what flags are enabled by -XX:+AggressiveOpts on 1.6u20. Typically I do this by looking at the method Arguments::set_aggressive_opts_flags() in hotspot/src/share/vm/runtime/arguments.cpp file, but I am un开发者_StackOverflow中文版able to find the sources to 1.6u20 at http://download.java.net/jdk6/source/.

  • Is there some other way to figure out what flags -XX:+AggressiveOpts enable?
  • Where can I get sources to 1.6u20 release?


To check it for particular release:

java -XX:-AggressiveOpts -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version > no_agg
java -XX:+AggressiveOpts -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version > agg

And then make diff (diff -U0 no_agg agg).

For example, jdk 1.7.0_51:

-     bool AggressiveOpts                           := false           {product}
+     bool AggressiveOpts                           := true            {product}

-     intx AutoBoxCacheMax                           = 128             {C2 product}
+     intx AutoBoxCacheMax                           = 20000           {C2 product}

-     intx BiasedLockingStartupDelay                 = 4000            {product}
+     intx BiasedLockingStartupDelay                 = 500             {product}

-     bool UseFPUForSpilling                         = false           {C2 product}
+     bool UseFPUForSpilling                         = true            {C2 product}

Jdk 1.8.0:

-     bool AggressiveOpts                           := false           {product}
+     bool AggressiveOpts                           := true            {product}

-     intx AutoBoxCacheMax                           = 128             {C2 product}
+     intx AutoBoxCacheMax                           = 20000           {C2 product}

-     intx BiasedLockingStartupDelay                 = 4000            {product}
+     intx BiasedLockingStartupDelay                 = 500             {product}

-     bool EliminateAutoBox                          = false           {C2 product}
+     bool EliminateAutoBox                          = true            {C2 product}

-     bool UseFPUForSpilling                         = false           {C2 product}
+     bool UseFPUForSpilling                         = true            {C2 product}


Check out this blog post to find out without needing to dive into the code. http://q-redux.blogspot.com/2011/01/inspecting-hotspot-jvm-options.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号