JDK-8150552 : Remove -XX:+AggressiveOpts
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10,11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-02-24
  • Updated: 2019-02-12
  • Resolved: 2018-10-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b17Fixed
Related Reports
Blocks :  
Sub Tasks
JDK-8212915 :  
Description
-XX:+AggressiveOpts has been used as a catch-all method of enabling various experimental performance features, mostly targetted to improve score on very specific benchmarks. Most things it affected has been removed or integrated over time, e.g., JDK-8024826, leaving the behavior of the flag ill-defined and prone to cause more issues than it'll solve.

I suggest removing the flag altogether, possibly in a staggered fashion similar to MaxPermSize where it will produce a warning message in JDK X and then refuse to run in JDK X+1.
Comments
The confusion over "removed" versus "obsoleted" resulted in the documentation being updated incorrectly.
12-02-2019

The message that "support was removed" is automatically generated by the VM when using a flag that has been obsoleted. Do you mean that should be changed? I think it's technically equivalent with "obsolete", perhaps more intuitive. If you mean that the summary of this bug should have been "Obsolete -XX:+AggressiveOpts" then sure, that would have been better.
12-02-2019

This flag has been OBSOLETED in 12 not REMOVED. Obsolet flags are accepted, but ignored other than a warning: Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option AggressiveOpts; support was removed in 12.0 java version "12-internal" 2019-03-19 Java(TM) SE Runtime Environment (fastdebug build 12-internal+0-2019-01-29-0052178.daholme.null) Java HotSpot(TM) 64-Bit Server VM (fastdebug build 12-internal+0-2019-01-29-0052178.daholme.null, mixed mode, sharing)
12-02-2019

Thanks David, I've created JDK-8212915.
24-10-2018

You also need to work with the docs team to get the official java command docs updated to remove references to AggressiveOpts: https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-3B1CE181-CD30-4178-9602-230B800D4FAE It should have been updated for Java 11 when it was deprecated. Probably create a subtask to this issue and put it in docs->tools
24-10-2018

http://cr.openjdk.java.net/~thartmann/8150552/webrev.01/
23-10-2018

The only effect that the flag currently has is setting AutoBoxCacheMax = 20000 and BiasedLockingStartupDelay = 500. Both can be done manually. The flag will be deprecated in JDK 11 by JDK-8199777 and removed in JDK 12.
19-03-2018

I added the 'c2' label because most optimizations controlled by AggressiveOpts are C2-related.
14-02-2017