JDK-8199778 : Deprecate -XX:+AggressiveOpts
  • Type: CSR
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 11
  • Submitted: 2018-03-19
  • Updated: 2018-03-21
  • Resolved: 2018-03-20
Related Reports
CSR :  

Deprecate the AggressiveOpts flag in JDK 11 because it's behavior is ill-defined. The flag will then be removed in JDK 12.


AggressiveOpts has been used as a catch-all method of enabling various experimental performance features, mostly targeted to improve score on very specific benchmarks. Most things it affected has been removed or integrated over time, leaving the behavior of the flag ill-defined and prone to cause more issues than it'll solve. The only effect that the flag currently has is setting AutoBoxCacheMax = 20000 and BiasedLockingStartupDelay = 500. Both can be done manually by setting the corresponding flags on the command line.


Deprecate the flag in JDK 11 and then remove it in JDK 12.


The AggressiveOpts will be marked as deprecated in JDK 11.

I see the parent issue already has a release note. Moving to Approved.

Changed assignee by mistake.

Thanks Vladimir. I've added a description to the release note subtask (JDK-8199847) and I'll remove the flag from our testing with the fix for (JDK-8199777). I'll move this CSR to Finalized as David Holmes suggested.

Reviewed. This flag removal is long overdue. One purpose was to hide experimental flags which we could not use in benchmarks results submissions. We changed with time what settings are done inside VM when it is specified without users known. Doc sub-task should be created to update Release notes to notify users as soon as possible. I definitely know that this flag was (and may still) used by customers because we used it in Java benchmarks results submissions.

Thanks David, setting this back to "Draft" then. [~kvn], could you please have a look?

A CSR request needs to have a Reviewer before it it is proposed or finalized. For simple requests like this I suggesting using the fast-track process, and move the CSR to Finalized once it has been Reviewed. It is unclear to me whether people may use this flag in the belief they may turn on special optimizations. But the deprecation warning should raise their attention to its demise and the release note will explain how to get the same effects.