JDK-8229158 : make UseSwitchProfiling non-experimental or false by-default
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-08-06
  • Updated: 2022-06-27
  • Resolved: 2019-08-20
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 11 JDK 13 JDK 14
11.0.8-oracleFixed 13.0.4Fixed 14 b11Fixed
Related Reports
Relates :  
Description
JDK-8200303 introduced a new experimental XX-flag -- UseSwitchProfiling, which was set to true by default, which is kinda weird as people need to opt-out of new behavior and also have to have -XX:+UnlockExperimentalVMOptions.

Comments
Fix request (13u): The original patch applies cleanly, sanity check with tier1 tests.
26-05-2020

Fix request (11u) I would like to downport this for parity with 11.0.8-oracle. Applies clean except for change to test LoopUnswitchingBadNodeBudget.java which is not in 11.
28-02-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/23e3ab980622 User: thartmann Date: 2019-08-20 08:46:51 +0000
20-08-2019

I'm against removing the flag completely. Switch Profiling had a bug tail (see JDK-8203196, JDK-8210389, JDK-8209544) and having a flag to turn the feature off greatly helps with debugging such issues. Also, removing the flag would break at least one of the two regression tests that Christian modified in his webrev.
08-08-2019

or we could remove the flag for good.
06-08-2019

http://cr.openjdk.java.net/~thartmann/8229158/webrev.00/
06-08-2019

Yes, that's my understanding as well. As David said, we could change it to diagnostic but UseSwitchProfiling should not be turned off by default.
06-08-2019

I expect the functionality provided by UseSwitchProfiling is intended to be always used, and that the flag exists "just in case" someone wants to turn it off. So it is the use of the flag to turn it off that is "experimental" (could have perhaps been diagnostic instead), not the underlying functionality.
06-08-2019